TFS Repository Auth Error
Asked by ucas_sureshgurunathan:

We are using Bamboo + "TFS Repository" Addon. We are getting "Access denied" error which connection. Please find the details below. Kindly check and share details to fix

**TFS** - <https://test.visualstudio.com/> (Azure DevOps)

**Auth** -- Azure AD based

**Error**:

error 27-Nov-2020 07:55:26 Error occurred while running Task 'Checkout Default Repository(1)' of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout.

error 27-Nov-2020 07:55:26 java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: com.microsoft.tfs.core.exceptions.TFSUnauthorizedException: Access denied connecting to TFS server <https://test.visualstudio.com/> (authenticating as test@test.com)

error 27-Nov-2020 07:55:26 at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:141)

error 27-Nov-2020 07:55:26 at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:99)

error 27-Nov-2020 07:55:26 at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:207)

error 27-Nov-2020 07:55:26 at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:188)

error 27-Nov-2020 07:55:26 at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:123)


Answers:
author: Sergey Podobry _Stellarity Software_
body: Check that you are using your [personal access token](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page) instead of a password. It's a base64 encoded string. Enter it into the password field.

comments: author: ucas_sureshgurunathan
body: [@Sergey Podobry _Stellarity Software_](/t5/user/viewprofilepage/user-id/502418) - I am using password. Do you want me to give base64 encoded password value in setting ?


author: Sergey Podobry _Stellarity Software_
body: [@ucas_sureshgurunathan](/t5/user/viewprofilepage/user-id/2022998) Yes, create a personal access token and specify it instead of a password in the TFS Repository configuration.


author: ucas_sureshgurunathan
body: [@Sergey Podobry _Stellarity Software_](/t5/user/viewprofilepage/user-id/502418) - Thank you for details. I have created personal access token and used. Still getting same error can you have a look ?  

27-Nov-2020 13:39:26 Caused by: com.microsoft.tfs.core.exceptions.TFSUnauthorizedException: Access denied connecting to TFS server <https://test.visualstudio.com/> (authenticating as test@test.com)  
27-Nov-2020 13:39:26 at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:75)  
27-Nov-2020 13:39:26 at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:23)  
27-Nov-2020 13:39:26 at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:70)  
27-Nov-2020 13:39:26 at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:645


author: Sergey Podobry _Stellarity Software_
body: [@ucas_sureshgurunathan](/t5/user/viewprofilepage/user-id/2022998) Send to support@stellaritysoftware.com your zoom meeting id or teamviewer or skype. Whatever works for you best.


Tags: authentication

integration

team-foundation-studio

token