title: How to use device code flow with Azure B2C
body: <p>I would like to set up authorization in a dotnet web api project using Azure B2C with device code flow.</p>
  
  <p>I have successfully set up this sample <a href="https://github.com/Azure-Samples/active-directory-b2c-dotnetcore-webapi" rel="nofollow noreferrer">https://github.com/Azure-Samples/active-directory-b2c-dotnetcore-webapi</a> 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.</p>
  
  <p>Now I would like to use Postman to obtain an access token and call my API using <a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-device-code" rel="nofollow noreferrer">device code flow</a>. 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.</p>
  
  <p>I can obtain a device code using Postman and go to <a href="https://microsoft.com/devicelogin" rel="nofollow noreferrer">https://microsoft.com/devicelogin</a> 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.</p>
  
  <p>Is there any way to use device code flow with an Azure B2C tenant?</p>