0
votes

I am trying to exchange a SAML assertion from Azure AD B2C for an api access token?

POST /myb2c.onmicrosoft.com/B2C_1A_signup_signin_saml/OAuth2/v2.0/token HTTP/1.1
Host: myb2c.b2clogin.com
Content-Type: application/x-www-form-urlencoded

grant_type=urn:ietf:params:oauth:grant-type:saml2-bearer&
client_id=abc20e17-6d33-49f4-8081-1f3aaec466b1&
scope=openid https://myb2c.onmicrosoft.com/api/demo.read&
assertion=xxxxxxxxxxxxxxxxxxxxxxx&
client_secret=123456789

I need to get an access token for an API from a SAML webapp using AzureAD B2C.

1

1 Answers

0
votes

Based on the document, to request an access token, you need an authorization code.

And you can see the Authentication protocols listed in Azure AD B2C is:

enter image description here

There is no OAuth 2.0 SAML bearer assertion flow here.

And here are the Authentication protocols in Azure AD document:

enter image description here

I'm afraid that it's not supported on Azure AD B2C.