How to leave my old Azure AD tenant

How to leave my old Azure AD tenant

January 6, 2023 0 By Cezary Oltuszyk

Today I had a little cleanup in my Azure service. While removing old databases, devices or other types of resources was not a major problem, cleaning up the list of available tenants in Azure AD turned out to be not so easy.

In particular, one old entry proved problematic:

After selecting Leave tenant option and logging into my microsoft account, I always got the following error message:

The error message is in polish, but the translation is:

You can’t sign in here with a personal account. Use your work or school account instead.

So how can I leave this old b2c tenant?

This tenant is several years old, I do not use it, and I do not have any work or school account connected with it.

The idea is to log into and check if there is an option to leave the tenant. Unfortunately, you can’t do it directly with a private account, because:

I think you alrready know this error message 😉

What’s the trick

The solution for this problem is to log in into providing tenant id as a parameter.
You can find your tenant id in Azure Portal Active Direcory Manage Tenants pane under Organization ID name:

When you know your tenant id, provide myaccount link in following format:

After logging in, navigate into Organizations pane, find the tenant and choose option Leave:


Sometimes getting things done in Azure is not as easy as it seems. I leave the trick on the blog, so that you can save your time and not break the topic again. Wouldn’t be useful 😛