Z
ZITADEL
Z
ZITADEL
How to pass specific user role (grant) at registration
Original message was deleted
ZITADEL
Join
ZITADEL - Identity infrastructure, simplified for you.
4,316
Members
View on Discord
F
FFO
•
9/18/24, 9:06 AM
Yes you can parse the idp response
.
I
.e
. this is an example with a picture
https://github.com/zitadel/actions/blob/main/examples/add_picture_claim_from_idp_metadata.js
And this is a grant
https://github.com/zitadel/actions/blob/main/examples/add_user_grant.js
D
dmkmlg
@FFO thanks for the fast answer! Sounds promising. How would one pass metadata v...
F
FFO
•
9/20/24, 12:26 PM
What kind of metadata are we talking here
?
F
FFO
•
9/26/24, 11:15 AM
You want to pass that info from the source idp to zitadel and then to your app
, right
?
It all starts by the source idp supplying that information as a claim in its response
.
You can then choose one of two options
:
1
) you can map that claim to a metadata field and write it into the access token
(my example above
)
2
) you can map that claim into a grant by reading it
(like here
https://github.com/zitadel/actions/blob/main/examples/add_picture_claim_from_idp_metadata.js
) and then creating a grant
(
https://github.com/zitadel/actions/blob/main/examples/add_user_grant.js
) with this your app can request the roles
(check
https://zitadel.com/docs/guides/integrate/retrieve-user-roles
for more details
)