Help adding B2C tenant to subscription

EJ Marmonti 141 Reputation points
2021-08-13T10:58:30.443+00:00

I'm having some trouble with linking an Azure B2C tenant to a subscription. I need to do this so that I'll be able to run powershell against it for custom policies, etc.

In our organization, we have a primary directory which has all internal org resources (users, VMs, apps, vnets, etc) attached to it. Let's call this directory A. We also have a separate tenant for a web application that external users use which requires oauth. This portion itself if working fine and that application is live in production. Let's call this directory B. My account has complete admin access to both directories.

If I switch to directory B, then I go to Azure AD B2C -> Overview, it tells me the subscription status is Registered, and has a subscription ID which is the same exact subscription ID of the subscription in directory A, where I created this tenant.

If I follow the instructions at https://learn.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-tenant to try and Link an existing B2C tenant to my subscription, the B2C (directory B) is not found.

When I try to launch Powershell via a cloud shell when in directory B, it tells me"No valid subscriptions found" and links me to https://aka.ms/cloudshell/free. If I click that link, and go to Pay as you go -> Get started -> (authenticate again) -> I get the "Create a subscription" page. This is confusing because I already created a subscription in directory A for this, of which the subscriptionID matches in B2C. But if I continue through the "Create a subscription" wizard, on the 'subscription directory' drop-down menu, I do see all of our directories, including both directory A & B. I see that I'm supposed to select "the AAD to associate the directory with", so I could in theory select directory A, then Create. But something about this process feels incorrect so I haven't completed it.

Is anyone able to assist? Am I doing something wrong?

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,775 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Marilee Turscak-MSFT 36,411 Reputation points Microsoft Employee
    2021-08-13T21:15:20.207+00:00

    If you are seeing the subscription status as registered and are not seeing the "No subscription linked error", then it should be linked.

    To confirm, you can do the following:

    Switch Directories to the location of your target Azure subscription
    Under Marketplace, search for and select 'B2C'
    Select "Create to link this B2C Tenant" to a subscription

    A subscription linked to an Azure AD B2C tenant is for Support, Billing and to use Custom Policies and can not be used to create other Azure resources. So based on your description, this would appear to be expected behavior.

    I would recommend using Windows Powershell rather than Cloudshell.

    See related:
    Unable to launch Cloud Shell - Asking me to create new subscription when I have one already
    How to create an ad-b2c tenant under existing subscription

    Let me know if this helps.