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?)
}
],
...