A utility to deploy Azure AD (AAD) B2C IEF starter pack policies automatically

Rory Braybrook
The new control plane
3 min readFeb 2, 2021

Once you have created a B2C tenant, the next step is to run through all the steps in the “Getting Started” doc.

There is now a utility to do this for you!

The utility can be found here.

When you click “Submit Query” you will be asked to sign in.

You might get an error message like:

https://b2ciefsetupapp.azurewebsites.net/Error?msg=QUFEU1RTNTAwMjAyO……

Take the error message (the bit starting with “QUF…” ) and run it through a Base64 decode.

In my case:

AADSTS500202: User account ‘{EmailHidden}’ from external identity provider ‘live.com’ is not supported for API version ‘2.0’. Microsoft account pass-thru users and guests are not supported by the tenant-independent endpoint.

So you cannot use MSA / Live accounts. Use a local account (of the form user@tenant.onmicrosoft.com) that has Global Admin. privileges.

Once signed in — wait a bit — there’s lot’s to do!

Then you should see:

Click the first link. Sign in (just select the user that’s already signed in).

“Accept” and you’ll be redirected to a non-existent page.

Click the second link. Sign in (just select the user that’s already signed in).

“Accept” and you’ll be redirected to a dummy jwt.ms page.

Now if you look at the tenant, you’ll see the standard and phone policies.

There are the three default applications plus a handy test one.

There are the two default policy keys. Note there is not one for Facebook as I ticked the “Remove Facebook” box.

It comes with a test application. This application has a redirect URL of:

https://jwt.ms

Run the “B2C_1A_signup_signin” policy.

Click “Sign up now”.

You can sign up and sign in as usual.

Run the “B2C_1A_SignUpOrSignInWithPhone” policy.

Click “Sign up now”.

You can sign up and sign in as usual.

Both accounts (email and phone) are successfully created.

Very useful!

If you click the “Experimental” tab, you can deploy some other policies on top of the scaffolding the utility creates.

There is a long list e.g. :

I’ve added this utility to my “Tips and Tricks” blog post.

All good!

--

--

Rory Braybrook
The new control plane

NZ Microsoft Identity dude and MVP. Azure AD/B2C/ADFS/Auth0/identityserver. StackOverflow: https://bit.ly/2XU4yvJ Presentations: http://bit.ly/334ZPt5