davidjrh/dnn.azureadprovider

Anyone trying this with AzureB2C?

Closed this issue · 3 comments

I have been trying to make this work with AzureB2C and seem to be getting very close, but not quite. I think it is actually trying to auth against the AzureAD accounts that I'm using behind AzureB2C. AzureB2C seems to be a good way to centralize various other auth-providers to DNN.

Any feedback, suggestions appreciated.

Hi, I remember I started to implement it but I needed to jump to other project and never got it finished. There is a branch called "aad-b2c" (https://github.com/davidjrh/dnn.azureadprovider/tree/aad-b2c) with some minor modifications I did for the PoC:

https://twitter.com/davidjrh/status/922492624694628352

gnanm commented

@davidjrh : I am able to successfully integrate with Azure B2C with the help of https://twitter.com/davidjrh/status/922492624694628352. But i am facing a challenge in adding custom user roles and make the new user as authorized.
In the "GetToken" method that gets overriding from OAuthClientBase, I am setting the custom Roles as shown below:
JwtSecurityToken.Payload.AddClaims( new List<Claim> { new Claim(ClaimTypes.Role, "custom role 1") } );

But somehow this claim is not being used while creating user roles. Also i am unable to set the user default authorized as true. Any thoughts?

PS: @jratwork - you can ping me or email me: gnan_m@yahoo.com separately where i can share you the insights of AzureB2C. Thanks

hi @jratwork @gnanm

@cesarab and me worked on a new provider for Azure AD B2C that is available and open sourced at https://github.com/intelequia/dnn.azureadb2cprovider

Give it a try!