cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerOutage
Helper III
Helper III

Pass Additional Metadata in JWT Payload?

Is it possible to pass additional metadata in the JWT payload?

I started looking here:
https://carldesouza.com/jwt-json-web-tokens-and-power-apps-portals/?utm_source=rss&utm_medium=rss&ut...

PowerOutage_0-1659039202049.png


as you can see, there is a good amount of metadata passed in the payload, but I'd like to pass one more field.

2 ACCEPTED SOLUTIONS

Accepted Solutions
dileeps
Power Apps
Power Apps

You can't add custom columns to this token. The way to get custom columns would be calling dataverse directly from your application (which is using this jwt token) and get the additional columns u require for this contact (contact id is in sub claim).

View solution in original post

NikitaPolyakov
Microsoft
Microsoft

@PowerOutage  You would do claims mapping on initial Registration/SignUp flow to get that field from B2C to Portal Contact "user" record, then you can get it server-side for that same ContactID as Dileep suggested from down-steam API.

View solution in original post

5 REPLIES 5
NikitaPolyakov
Microsoft
Microsoft

Great question, we're taking a look!

 

Do you have more context on the use-case on what you hope to do?

In my contact table, I have a required column titled Color.  When the user logs in, I'd like to pass that field value through the claims.  Looking at the default fields returned, you'd think it's a configurable value somewhere.  companysize, balance, ...


I'm currently testing how to do the same thing with B2C, and it appears to be reasonably straightforward. 


dileeps
Power Apps
Power Apps

You can't add custom columns to this token. The way to get custom columns would be calling dataverse directly from your application (which is using this jwt token) and get the additional columns u require for this contact (contact id is in sub claim).

PowerOutage
Helper III
Helper III

That's the route we took for the default token.  Thank you for the info!

NikitaPolyakov
Microsoft
Microsoft

@PowerOutage  You would do claims mapping on initial Registration/SignUp flow to get that field from B2C to Portal Contact "user" record, then you can get it server-side for that same ContactID as Dileep suggested from down-steam API.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,855)