Dotnet template: Admin website can not add profile mapper
The add mapper dialog show nothing.
What I want to do is add userId and realm info to profile, so I can include these infos in access token, how can I achieve this?
I think add password page also have a bug like this @simpleidserver
Both issues are fixed in the release/v6.0.3 branch :). There were some missing using statements.
When will version 6.0.3 be released? And before that, if I want to get the userId and realm in the access token, is modifying it through an API the only way? @simpleidserver
Hello @littlesmilelove,
First of all, sorry — I didn’t notice your latest question. :(
Yes, it’s possible to include the userId in the access token by updating the mapping rules of a scope:
- Edit an OpenID scope, for example
profile, and navigate to theMapperstab. - Click on the
Add mapperbutton. - In the popup, select the
Propertyoption and clickNext. - Fill in the form with the following values and click Save to add the mapping rule:
| Property | Value | Description |
|---|---|---|
| Name | userId | Unique name of the mapping rule |
| Token Claim Name | userId | Name of the claim to be added in the identity/access token |
| Claim JSON Type | STRING | Type of the JSON element |
| User Property | Id | Property from the user object (e.g., Id, Email, etc.) |
| Include in Access Token | true | Ensures the claim is included in the access token |
At the moment, it's not possible to include the realm in the access token unless you implement custom classes.
That said, the iss (issuer) claim in the access token already contains the realm information — isn't that sufficient for your needs?
KR,
SID