Attempting to map an EntraID access token as a custom claim #16619
Unanswered
smarcucciohal
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a typical authentication flow that includes a Generic OAuth source (pointing to Azure/EntraID). I have created a property mapping (applied to the Generic Oauth source) to extract the access token from EntraID.
I then have a scope mapping that attempts to return the access token as a custom claim:
This all works when a user is first authenticated in EntraID and then created in Authentik. I see the "entraid_access_token" in the user's attributes. The problem is that on re-authentication, the user's attributes are not updated.
Is there a way to force Authentik to always update the user's attributes on every login? I've read that a "Post-Authentication Signal" can be used to do this, but it seems quite complex.
NOTE: I also tried simply passing the access token this way:
But, in this case "entraid_access_token" was not present when the scope mapping executed.
Beta Was this translation helpful? Give feedback.
All reactions