I’m creating a demo application in .NET Core 2.1, which uses Azure AD B2C to login with Facebook, all good there, however, I would like to get the facebook access token to be able to invoke facebook api, I thought it would be added to claims or at least have access to an event like OnAuthorizationCodeReceived, where you would retrieve the access tokens, though so far I see no way to do it.
Is there any way to retrieve the facebook access token through azure b2c, if not, what would be the best recommended alternative?
Thanks.
2
Answers
It seems it is now possible to get the Identity Provider Access Token as a claim using Azure B2C, check Pass an access token through a user flow to your application in Azure Active Directory B2C
Currently, an access token from the external identity provider (e.g. Facebook) can’t be passed through Azure AD B2C to your client application, i.e. this isn’t a supported scenario as yet.
The only alternative is to implement a direct federation between your client application and Facebook.