1
votes

I would like to set up authorization in a dotnet web api project using Azure B2C with device code flow.

I have successfully set up this sample https://github.com/Azure-Samples/active-directory-b2c-dotnetcore-webapi with my Azure B2C tenant and my custom signin policy. I can obtain an access token using Postman if I select the OAuth 2.0 authorization type.

Now I would like to use Postman to obtain an access token and call my API using device code flow. The problem is I can't find any documentation or sample on how to do this. The docs show how to do this using a regular Azure tenant, not a B2C tenant having a custom singin policy.

I can obtain a device code using Postman and go to https://microsoft.com/devicelogin and use that code, but I can't log in using the users I set up in my B2C tenant. Also, I can't find any way to make it use my own custom signin policy defined in my B2C tenant.

Is there any way to use device code flow with an Azure B2C tenant?

1
did you find any workaround?simpleProgrammer
Nope, it's simply not supported. I ended up using AzureAD authentication (not B2C).Ove
Just thinking out loud, would federating to AD from B2C help in any away? Then the AD could do the device login ..?Michiel Cornille

1 Answers

0
votes

Based on the documentation https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-reference-oidc it is not supported.

enter image description here

Only authorization code/hybrid/implicit flows are supported.