I am running Visual Studio 2015. It is registered on my machine under my personal Microsoft account. Running on Windows 10 Professional.
I can connect to my personal tfs at visualstudio.com with no issue.
I can connect to a corporate tfs at visualstudio.com with no issue, under a second Microsoft (Office365) account.
I have a third corporate tfs at visualstudio.com that it refuses to connect to, which uses a third Microsoft (Office365) account.
My corresponding MS account is actually the owner for this repository.
I am able to login via the website without any issue (at mycompany.visualstudio.com ).
Trying to login to this third one in Visual Studio however gives the error message:
I've double checked the url, double checked all my credentials. I've done the usual suspect fix of clearing all of IE's cache, and just for good measure, cleared all of Edge's cache too.
UPDATE: I've now tried removing all the accounts from the VS login dialog; and logged out of VS; and cleared IE cookies, and then logged back in and added all accounts as necessary, and still get this error, even though the web site works fine.
Turns out this is actually a problem with VSTS. Other users are having the same problem. Bigger issue at play.
The account that you are using does not have permission to access that account on VSTS. You should click the "change account" button in your screenshot and use an account that does have permission.
Note: Something that can be confusing is that you can have an MSA that is the same email as your corporate AAD account. This means that the email address can look like the right one, but may in fact not be. Try switching and loggin in again rather than picking from the list.