Share via

Troubleshooting directory and subscription problem

Philip Lukens 0 Reputation points
2024-03-14T18:04:19.88+00:00

I have two directories: lukensfamily.onmicrosoft.com and communitycb2c.onmicrosoft.com. I want to use communitycb2c.onmicrosoft.com for external user sign ins and have a B2C Tenant set up. However, when I am in the communitycb2c directory, I can not link the subscriptions. I have two subscriptions set up trying to make this work. The first is Azure subscription 1 and the second I labeled Subscription 1 Markup Card Billing. I have been running in circles trying to figure out this problem. Any suggestions?

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-03-15T22:43:11.5133333+00:00

    Hi @Philip Lukens , Here are some troubleshooting steps you can try:

    1. Ensure that you have the necessary permissions to link the subscriptions to your directory. You must be a Global Administrator or a Subscription Owner to link a subscription to a directory.
    2. Verify that the subscriptions you want to link are associated with the same Azure AD tenant as your communitycb2c directory. You can check this by navigating to the "Access control (IAM)" blade for each subscription and verifying that the "Directory + subscription" filter at the top of the blade is set to the correct directory.
    3. Check that you are signed in to the correct directory in the Azure portal. You can check this by looking at the directory name in the top right corner of the portal. If you are not signed in to the correct directory, you can switch directories by clicking on your username in the top right corner and selecting the correct directory from the dropdown.
    4. If you are still having trouble linking the subscriptions to your directory, you can try using the Azure CLI or PowerShell to link the subscriptions. Here are the steps to link a subscription using the Azure CLI:
      1. Open a command prompt or terminal window.
      2. Run the following command to sign in to your Azure account: az login
      3. Run the following command to set the active directory context to your communitycb2c directory: az account set --subscription;subscription-id; --tenant ;tenant-id;
      4. run the following command to link the subscription to your directory: az ad sp create --id;subscription-id
    • Here are the steps to link a subscription using PowerShell: Open a PowerShell window. Run the following command to sign in to your Azure account: Connect-AzAccount Run the following command to set the active directory context to your communitycb2c directory: Set-AzContext -SubscriptionId;subscription-id; -TenantId;tenant-id; Run the following command to link the subscription to your directory: New-AzADServicePrincipal -ApplicationId;subscription-id;

    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.