1
votes

I am using Custom policies according to the Starter pack (https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/tree/master/LocalAccounts) and Custom Policy documentation. I am using custom policies in my web app.

I got an Azure side error after entering the right credentials on sign in page.

enter image description here

2
Can you include your custom policy as well as a screenshot of the keys you've configured as per this step: docs.microsoft.com/en-us/azure/active-directory-b2c/…Saca
And can you also explain how you had created the key in the first place? Are you importing your own key, or did you use the auto-create?Omer Iqbal
I paid attention to create signing and encryption keys by exacly following the link. After regeneration of the keys and IdentityExperienceFramework application the problem was solved. Thank you @SacaKadir Can
Good to hear. Can you please upvote the answer and flag your question as answered?Saca

2 Answers

2
votes

The error AADB2C: Encryption key must be a 256-bit key indicates an error with the key you configured. Please see the add-signing-and-encryption-keys-to-your-b2c-tenant-for-use-by-custom-policies documentation for a step-by-step guide on how to do this correctly.

Otherwise, please post more details (policy xml, screenshots of key config, etc) so that we can provide you with more prescriptive guidance.

0
votes

I had the same error - the problem was that i forgot to switch to RSA as the Key Type.

... 4. For Key type, select RSA. ...

and take care to select the right key for Signature and Encryption.