Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/ApplicationID in User TokenForum ↗

ApplicationID in User Token

App Development4 posts249 views2 likesLast activity Jun 2023
FR
FrankieOP
Jun 2023

Hi,

Any way to setup ApplicationId field in the user token? I tried below and it did not work

{
   "aud": "https://daml.com/jwt/aud/participant/someParticipantId",
   "sub": "someUserId",
   "exp": 1300909192,
   "applicationId": "someId"
}

If so, what format it should be and does it apply to both Audience based token and Scope based token?

Thanks.

CO
cocreature
Jun 2023

No you cannot set the applicationId. It is always set to your user id, i.e., the value you specify in sub.

FR
Frankie
Jun 2023

Thanks @cocreature. Just to clarify, does that mean I have to use my userId as applicaitonId in the command submission in user token setup? Or, the applicationId in the command can be ignored?

CO
cocreature
Jun 2023

You can either not set it (if you’re running with auth enabled) and it will be inferred to be the user id in your token or you can set it to the same value as your user id. If you set it to anything else you will get an error.

← Back to Discussions