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
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

MPP IDEAS

Ideas

Discover ideas and concepts from users like you for how to use Power Pages and take your work to the next level.

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Carousel Community Blog

Check out the Community Blog

Read all about the most recent blogs in the community!

Users online (3,866)