Cognito User Custom Attribute Doesn't Update from Federated IdP When OIDC Claim Doesn't Exist

1

When I'm using Cognito with a federated identity provider, and I'm mapping the custom string attribute of "custom:roles" to the "roles" claim on the OIDC token from my provider, it works great when I'm going from no roles mapped -> some roles mapped. However, when I remove all roles from the provider side, so that the claim doesn't exist when it's returned to Cognito after sign in, the "custom:roles" attribute still shows the old roles, rather than removing the attribute entirely.

How can I fix this so that the roles attributes are synced across identity providers (Cognito and my own IdP)?

1 回答
0

Before digging deeper, can you please verify that the custom attribute is mutable? If it is immutable, you can only write to it once. See Custom attributes section in the docs.

If it is mutable, please verify that your app client has the required write permission for that attribute - refer to the Attribute permissions and scopes section in the docs for more information.

profile pictureAWS
Martin
已回答 4 个月前
profile picture
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则