0

I'm using Azure Identity client library for Python to authenticate a local server for testing. It works well for the people that has no private tenantID under managedByTenants because the identity library would pick the homeTenantID for authentication.

For my case, since I have a private tenantID, the identity library picked this one and treated as the homeTenantId. As a result, I cannot stop running my local server, because I got the error tells me that the tenantID is wrong. How can I remove this private tenantID?

INFO:

After checking my Azure login account details by az account show I found I have 2 tenant ID shown as follow

"environmentName": "AzureCloud",
  "homeTenantId": "132n1938-xxxx-xxxx-xxxx-xxxxxxxxxx", (our department tenant ID)
  "id": "cynk120n-xxxx-xxxx-xxxx-xxxxxxxxxx",
  "isDefault": true,
"managedByTenants": [
    {
      "tenantId": "1n2b7651-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (Where this comes from? And how can I remove it?)
    }
  ],
...
SLN
  • 4,772
  • 2
  • 38
  • 79

1 Answers1

0

To remove the Private tenant from your managed tenantID you should be login from Managed tenant and also you should have the privilege to delete the child tenant from Managed tenant.

To remove a tenant from your Partner Center account, find its name on the Tenants page (in Account settings), then select Remove. You'll be prompted to confirm that you want to remove the tenant. After you do so, no users in that tenant will be able to sign into the Partner Center account, and any permissions you have configured for those users will be removed.

For more information please refer the below links:-

AjayKumarGhose
  • 4,257
  • 2
  • 4
  • 15