web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / OIDC Authentication cu...
Power Pages
Unanswered

OIDC Authentication custom field

(0) ShareShare
ReportReport
Posted on by 117

Hello guys,

 

I'm new to Power Pages, I managed to make the authentication work with OIDC, I have a table where the record on that user is saved after the login.

What I would like is when the login is successful to save data to another column also.

Right now, after the login, the First name, Last name and email are saved in that table.

I had manually tried to login and when it redirects at the end, it has the JWT encoded `id_token` that contains the bellow, beside other fields.:

 

 "given_name": "Madalina",
 "family_name": "Nielsen",
 "email": "mail@mail.com",

 

How does power pages know to save given_name to First name column and so on?

And how can I tell it to save some other fields from the JWT in some column inside that table?

Categories:
I have the same question (0)
  • Saud Ali Profile Picture
    812 Super User 2024 Season 1 on at

    Hi @sweb ,

     

    Can you explain how you're currently saving these values in Dataverse? If you can provide some sample it would be easily to guide how you can save other values to different columns.

     

    Thanks,

    Saud

     

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • sweb Profile Picture
    117 on at

    My colleague set things up, all I did was to create the Identity provider and all worked.

    I did it by choosing "Other" when asked for "Select login provider" and for Protocol, OpenID Connect.

    I thought this was default behavior, but I will ask him what he did and will get back to here.

     

    Thank you!

  • Fubar Profile Picture
    8,497 Super User 2026 Season 1 on at

    @sweb wrote:

     

    How does power pages know to save given_name to First name column and so on?

    And how can I tell it to save some other fields from the JWT in some column inside that table?


    There is some out of the box stuff that you will not see, but generally speaking it is done via Claims Mapping.

    The instructions to do it are in the links below, but they are not as clear as what they should be. When you are configuring the PowerPages provider there is a collapsed "Additional settings" section that has some additional fields you populate (this is where the second link is saying now add. it to the Site Setting, and there is stuff you need to do above the second link)

     

    https://learn.microsoft.com/en-us/power-pages/security/authentication/openid-settings

    https://learn.microsoft.com/en-us/power-pages/security/authentication/openid-settings#configure-additional-claims

  • sweb Profile Picture
    117 on at

    @FubarThank you, have advanced using those links

     

    Have done the Configure additional claims 

    Will start with step 3 & 4, cvrNumberIdentifier is the name of the column in the database and the name of the field in the id_token JWT response.

    PsajiCn

    Until here I think all went ok, the step 1 got me stuck, Configure optional claims in Azure AD 

    I went to the Manifest and added changes like below, it's what I got from this statement on that page

    Have also tried source as user and essential as true, nothing happened, the login went as before and the new column was still empty.

    If I go to Token configuration is sais it's not supported since it's not on that predefined list. How can I add custom named claims?

     

     

     

     

    	"optionalClaims": {
    		"idToken": [
    			{
    				"name": "cvrNumberIdentifier",
    				"source": null,
    				"essential": false,
    				"additionalProperties": []
    			}
    		]
    	},

     

     

     

     

    ITiBpxy

     

     
  • Fubar Profile Picture
    8,497 Super User 2026 Season 1 on at

    Not sure if this is the issue or if you have other setup issues also, but the left hand side of the '=' in the field mapping should be the logical schema name of a field on the dataverse Contact table (currently it is not), custom fields will have a prefix (only standard out of the box fields have no prefix) and should be all lowercase eg. new_mycustomfield=.....

  • sweb Profile Picture
    117 on at

    Hi @Fubar, indeed, in the Dataverse under each column there are in the Advanced options 2 read only fields, Logical name and Schema name.

    vmZFhKh

    So this should be ok now.

    Format: field_logical_name=jwt_attribute_name where field_logical_name is the logical name of the field in Power Pages, and jwt_attribute_name is the attribute with the value returned from the identity provider.

     

    bXWA6cq

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 42

#2
Valantis Profile Picture

Valantis 24

#3
omkarsupreme Profile Picture

omkarsupreme 23

Last 30 days Overall leaderboard