After connecting Azure AD and then disconnecting it in Azure DevOps, I can no longer sign in to Azure Devops. Why not?
I have an Azure DevOps instance associated with my Microsoft account. I also have an Azure Portal instance associated with the same account. I was trying to create a new Static Web App in Azure Portal using one of the projects in Azure DevOps, but the Portal said it couldn't generate a PAT. A quick search led me to believe I should connect Azure DevOps to Azure Portal via the Azure Active Directory option of Organization Settings in Azure DevOps (https://github.com/Azure/static-web-apps/issues/887). I did that and tried to create the Static Web App again only this time none of my Azure DevOps projects were even available so I figured I had messed up somewhere. Back in Azure DevOps I disconnected the directory and was forced to logout.
I am no longer able to access my Azure DevOps instance at all. Other users can still access the instance so I know it's all still there, but I can't get in. I get a 401 message that says I don't have permission (when I log in with my Microsoft account) with a link to view my organizations. When I click that link I do actually see my Azure DevOps organization listed as being associated with Azure Active Directory still and that organization indicates that I am the owner of that organization, yet when I click on it I get the same 401 message again.
Obviously I messed something up and it may be as simple as I need to login to Azure DevOps as my Azure Active Directory user. The problem with that is I have no idea how to do that because as far as I can tell, the two accounts should be the same. I was logged into the Azure Portal with my Microsoft account and I was logged into Azure DevOps with the same Microsoft account.
I'm pretty desperate to regain access to my Azure DevOps instance ASAP so any help is appreciated.
@Andrew Webster Thank you for reaching out to us, just wanted to check if you have followed the steps mentioned in this post https://learn.microsoft.com/en-us/answers/questions/10538/connect-azure-devops-to-azure-actice-directory.html seems to be similar issue like its mentioned before.
Thanks for that link, but unfortunately it looks like I'm having a different problem. My Azure DevOps instance is not currently connected. I did connect it to Azure AD, but then I almost immediately disconnected it. I think the problem is that I didn't change ownership of Azure DevOps before disconnecting Azure AD, as described in this answer: https://developercommunity.visualstudio.com/t/lost-access-to-organisation-in-vstsdevops-after-co/463929#T-N464994. Using the information in the link you provided, I created a new Microsoft account for myself with a different email address, had another member of Azure DevOps make my new account a Project Collection Administrator, then transferred ownership of Azure DevOps to my new account.
The only issue I've got left is that my original account still can't access Azure DevOps. It seems like the problem may be related to the same email address being used for my Microsoft account and my AD account, but I don't know how to solve that, in AD, DevOps, or somewhere else.
Sign in to comment