Azure AD - Identity Experience Framework - Custom Policy

520 Views Asked by At

I want to implement custom policy in the Identity Experience Framework to authenticate Azure AD users. I have successfully uploaded the XML files for local and Azure AD users. When I run the sample application and try to log n using the Azure AD account, I got the following error.

Error message:

AADB2C90240: The provided id_token is malformed and could not be parsed. Please provide another token and try again

so, someone can help to solve this. Thanks in Advance.

1

There are 1 best solutions below

0
Rukmini On

The error usually occurs if there is issue with the ID token as mentioned in this MsDoc.

I agree with Markus Meyer, to resolve the error try generating the token with symmetric keys.

Create a shared key and add Azure AD B2C add the signing key like below:

Go to Azure Portal -> Azure AD B2C -> Policies -> Identity Experience Framework -> Policy Keys -> Manual

  • Use IdTokenHintKey for Name and enter the sign-in key in the secret box.
  • Use encryption for usage and create.
  • Create a technical profile which validates the token.
  • Create a policy

To know how to do it in detail, please refer below link:

Define an ID token hint technical profile in a custom policy - Azure AD B2C | Microsoft Docs