AzureAD / active-directory-b2c-wordpress-plugin-openidconnect

A plugin for WordPress that allows users to authenticate with Azure AD B2C using OpenID Connect.
MIT License
31 stars 28 forks source link

Exception occurs when trying to get 'emails' claim #19

Open craigbrown opened 6 years ago

craigbrown commented 6 years ago

Line 104 of b2c_authentication.php tries to get the 'emails' claim.

Even though I have emails selected as an application claim in my policy settings, the emails claim is not returned, so I get an exception on line 147 of class-b2c-token-checker.php with the message:

Undefined index: emails

ArthurDumas commented 5 years ago

@Frakur, I realize your comment is 10 months old but this is working for me. Confirm that Email Addresses is checked on the Application Claims for the specific User Flow(s) you are using in Wordpress (check both flows specified by Sign-in Policy for Users and Sign-in Policy for Admins in case they are different). I am only using AD B2C managed email identities. I am not using any social identity providers so perhaps there is a difference there.