Cognito User Pool custom attributes do not show up in the ID token if user pool is configured with a SAML identity provider
Asked Answered
F

0

3

According to the documentation, the ID token (a JWT token) created by Cognito upon user authentication is also supposed to contain the custom attributes defined for the user's User Pool. It seems that when the User Pool is configured with a SAML identity provider, the ID token does not contain those custom attributes of the user pool, but only the Cognito attributes which are mapped from the SAML token.
Note: the custom attribute is already configured when the user pool is created, therefore it does not make sense to set it up again in the SAML token, for example by configuring the remote AD FS attributes.

Is there any way to preserve a User Pool custom attribute in the ID token, in this case of using a federated identity provider? Or be able to hook into the authentication process to insert a custom attribute into the token?

Thanks for the help!

Fluoridation answered 10/4, 2018 at 21:28 Comment(1)
I noticed it does take some time before the custom attributes show up. Must have to push through the network, either that, or tokens are being cached. Eventually, they start showing up for me.Monocyte

© 2022 - 2024 — McMap. All rights reserved.