The short article shows you one of the possible way to resolve the error “TF31003: Either you have not entered the necessary credentials or your user account does not have permission …” when you use Visual Studio 2012 to connect to Visual Studio Online.
You might see the error pop up to you like the one below.
Then you are thinking how to change your credential in VS 2012. In fact, there is no way to change the credential in VS 2012. In order to change the credential you need to clear all the cache in Internet Explorer.
You might need to go to control panel > User Accounts > Manage Your Network Passwords select the Team foundation Server and choose remove.
You will not have this problem in Visual Studio 2013 or above because Visual Studio will prompt you to enter the credential.