3

Microsoft provides information for accessing Azure B2C with the Graph API.

https://learn.microsoft.com/en-us/azure/active-directory-b2c/microsoft-graph-operations

They have examples for utilizing Postman and Visual Studio. Both of which require a large amount of setup, in my opinion, to simply run a simple, one-time command as an admin (non-developer).

For example, here they provide a simple example of modifying an attribute on a user in Azure B2C: (Perhaps this is outdated)

PATCH https://graph.windows.net/yourtenant.onmicrosoft.com/users/user-id
{
    "extension_clientId_can_impersonate": "1"
}

I would like to execute this API command as simply as possible. Preferably with the Graph Explorer and avoid a bunch of setup just to do this one thing. Any time I connect to Graph Explorer it logs me in as my federated business identity that has global admin access to the Azure B2C tenant. But, the session seems to be stuck in the context of the parent directory, and I cannot seem to find a way to access the Azure B2C directory/tenant. Using the above URL isn't even valid.

Is it possible to run this command against my Azure B2C tenant using MS Graph Explorer?

Appleoddity
  • 647
  • 1
  • 6
  • 21

1 Answers1

2

I found that I can specify the tenant I want to connect to by providing a tenant parameter in the URL:

https://developer.microsoft.com/en-us/graph/graph-explorer?tenant=contoso.onmicrosoft.com

However, because of SSO, it kept taking me back to my parent organization directory. Therefore, I opened the site in an incognito window where I was able to login with a credential in the Azure B2C tenant.

Appleoddity
  • 647
  • 1
  • 6
  • 21