AzureDevOps - Your sign-in was successful but does not meet the criteria to access this resource

Occasional Contributor

Recently I wanted to connect my Visual Studio to a remote AzureDevOps Git repository for cloning the project. This repo is in one of our client's DevOps organisation. 

 

I was able access the AzureDevOps portal and access the repository in the browser. But when I tried to connect my Visual Studio to Clone the git repo I got Your sign-in was successful but does not meet the criteria to access this resource error while signing in. I got the same issue while cloning using the git bash.

Then I created a Personal Access Token (PAT) from the AzureDevOps portal and used the following powershell snippet to clone the repository.

$MyPat = 'yourPAT'
$B64Pat = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(":$MyPat"))
git -c http.extraHeader="Authorization: Basic $B64Pat" clone https://dev.azure.com/yourOrgName/yourProjectName/_git/yourRepoName

I was able to successfully clone the repo, then I opened the solution in Visual Studio and from then onwards everything worked fine.

 

Can anyone explain what could be the reason for this behaviour?

0 Replies