Hi @qwerty ,
Thanks for reaching out Microsoft Q&A.
It looks like you’ve ended up in an Azure DevOps org with zero Project Collection Administrators (the last admin left and was disabled), so even though you’re a Global Admin in Azure AD you can’t get in, you just see “401 Unauthorized.”
Here’s how you can recover administrative access:
- Confirm your organization is connected to your Microsoft Entra (Azure AD) tenant
- Sign in to the Azure portal → Azure Active Directory → Enterprise applications → All applications → search for Azure DevOps (or “VSTS”).
- Make sure the org shows up there. If it’s not connected, you’ll need to reconnect it (you’ll need at least one owner account in the org see step 3 or open a support ticket).
- Elevate yourself to the Azure DevOps Administrator directory role As a Global Admin you can grant yourself the built-in Azure DevOps Administrator role in Azure AD, which gives you organization-level rights in DevOps.
- In the Azure portal, go to Azure Active Directory → Enterprise applications → select Azure DevOps → Users and groups → Add user/group → pick your account and assign the Azure DevOps Administrator role.
- Add yourself as a Project Collection Administrator in the DevOps portal Once you have the directory role, sign in at https://dev.azure.com/YourOrgName → Organization settings (gear icon) → Azure Active Directory → Connect directory (if not already connected) → then under Project Collection Administrators, click Add and select your user.
- If you still can’t get in…
- Double-check that the org really is backed by AAD and not by Microsoft Accounts (personal accounts).
- Clear all browser cookies, sign out completely, then sign back in with your work account.
- If nothing helps, open an Azure DevOps support ticket and request a “Transfer Organization Ownership” or “Reassign Project Collection Administrator” since by design only an existing org admin or Microsoft Support can restore access when all admins are gone.
Hope this helps!
If the resolution was helpful, kindly take a moment to click on and click on Yes for was this answer helpful. And, if you have any further query do let us know.