How to get current logged in user details in workflow process step | Community
Skip to main content
Level 2
September 13, 2024
Question

How to get current logged in user details in workflow process step

  • September 13, 2024
  • 5 replies
  • 1448 views

I tried to get current logged in user using session and authorizable. But none of them giving the current user.

Is there any other way to get the current user details ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

DPrakashRaj
Community Advisor
Community Advisor
September 13, 2024

Are you referring to initiator of the workflow user if that’s the case then please refer to https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/is-it-possible-to-get-the-current-user-in-the-workflow/m-p/446998

current user can be found from session object 

session.getUserID();

I am not sure what’s the use case you have to get the current use in workflow process step and I believe in workflow you work with workflow session and not the current user session.

Level 2
September 14, 2024

Hi,

I need to check initiator and approver are same user or not. 

 

session.getUserID()

will return workflow-service user id not the user who logged in. 

joerghoh
Adobe Employee
Adobe Employee
September 15, 2024

A workflow process step is a piece of code, which runs in the background. For that it is not bound to a HTTP request and also not to a user in the first place. 

That means that in a process step the concept of a "current user" simply does not exist.

kautuk_sahni
Community Manager
Community Manager
September 25, 2024

@manikandan90 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni