How to get Identity ID from Form Submission

Hi all,

Does anyone know how I can get the id of an identity via a form submission where display name is being selected? It doesn’t appear that the ID is sent over as part of the form submission trigger.

Appreciate any assistance people could provide, thanks.

Form:

Event Trigger Data:

{“input”:{“_meta”:{“invocationId”:“8b6bfa5a-0c4e-40a5-8f21-87302ad64bba”,“subscriptionId”:“d6136c72-bfeb-459e-abb4-ef238d96b214”,“triggerType”:“FIRE_AND_FORGET”},“createdBy”:{“id”:“1dae0778be1e4b199803626451cbba79”,“type”:“WORKFLOW_EXECUTION”},“formData”:{“selectUser”:" Christopher Geluk"},“formDefinitionId”:“a94e8870-a72a-45fd-8ff0-bd1d81a08970”,“formInstanceId”:“7cf855b5-49ad-48fe-9565-74fd9994b3f6”,“name”:“Unblock IT Access Form”,“state”:“COMPLETED”,“submittedAt”:“2025-05-12T02:03:58.894067785Z”,“submittedBy”:{“id”:“omitted”,“name”:“omitted”,“type”:“IDENTITY”},“tenantId”:“omitted”}}

Hi @SeanK-W,
If you use predefined type in form field configuration, within the workflow you can directly use $.formdata.selectUser, Where you will be selecting the identity display name in the form dropdown and It will be referenced to identity id in workflow.

Hi @rkhade ,

Thanks for this; however, predefined doesn’t meet our use case as the dropdown needs to display users who have a specific role.

Additionally, I have tried to use the get identity workflow action using the selectuser as my variable; however, the workflow fails with error:

{“displayName”:“Get Identity”,“error”:"request failed (type: Bad Request, retryable: false): 404 - 404 Not Found: ",“stepName”:“getIdentity”,“task”:“sp:get-identity”,“technicalName”:“Get Identity”}

However this is expected because the workflow action relies on the Identity ID to get the details (which is not provided by the trigger).

:frowning:

Still trying to figure out how I can obtain the user ID in the workflow based on details provided by the trigger… Any ideas?

You can try using getIDentitites action with search query to get the identity by display name attributes.displaName:"{{$.trigger,dormData.selectUser}}", But it might cause issue when there are multiple users with same display Name

@SeanK-W get identity action need identity technical id as input.
As already suggested you have to use HTTP action or get list of identities operator to found your user by his displayname.

Thank you both,

Agreed that this may cause an issue regarding the Displayname, which is not ideal - would prefer to rely on a unique attribute to base this off.

I have got this working, however as you say it’s not reliable, is there any other way to get the ID of the user through the form submission trigger?

Only by using predefined i think. But this is not situable for you.

Use a lifecycle event trigger or workflow that captures the form input. The Identity ID is often available as part of the submission context, accessible via variables like $.trigger.identity.id in a workflow or within the identity object passed to the transform or action step.

Thanks all, spoke with some architects, it appears that there’s no way to retrieve the ID of a user based on a form event if the drop down selection config is via a search query with the selected display attribute as display name.

Which is a shame :frowning: - will raise it as an Idea.

Cheers all

Appreciate you digging into this. It’s unfortunate there’s no direct way, but logging it as an Idea is a great next step. Let me know if I can help support or upvote it when it’s submitted.