Azure AD B2C – Using the graph API

There’s a really good guide for getting started with CRUD operations in a AAD B2C tenant on the Azure documentation site;
https://azure.microsoft.com/en-gb/documentation/articles/active-directory-b2c-devquickstarts-graph-dotnet/

As per usual, I’ve ended up putting some powershell together to make it a bit more repeatable when I have to do this for multiple AAD tenants.

This particular script creates the application in the AAD tenant. I’ll be posting further scripts that show off doing some clever stuff when I’ve finished testing and polishing them.

9 thoughts on “Azure AD B2C – Using the graph API”

  1. HI gord

    Thanks for sharing
    Did you have issues where the App was not visible in the portal after creation via powershell.
    I can however find it if i search for it via client ID

    A.B

    1. Unfortunately the app won’t be visible in the portal. I’ve heard that this is a roadmap item and will be fixed at some point.

  2. And how does the powershell tell which directory the application is added too if they are multiple directories in a tenant

    1. The email address used for the $AdminUserName variable is where the directory is taken from. Eg. My b2c directory is meetr.onmicrosoft.com so the variable is “admin@meetr.onmicrosoft.com”

  3. Thanks for your prompt response @gord. Am stuck on deploying the app.Its deploying to the default directory but not to the custom B2C directory i have created.Any suggestions on how to force it to deploy to a custom directory?

  4. Thanks figured it out.Had too create a user in the New B2C directory. And run powershell using that users context.

  5. Hi Gordon,

    I noticed you are using the older MSOnline PowerShell module in your examples. It may be useful to start using the newer Azure Active Directory PowerShell V2 module instead, as we will begin deprecating the MSOnline module when we have migrated the functionality of the MSOnline module to the newer module – currently planned for the Spring of 2017.

    Thanks,

    Rob de Jong

Leave a Reply

Your email address will not be published. Required fields are marked *