Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TF400813: Resource not available for anonymous access. Client authentication required. #16

Closed
simondel opened this issue Apr 3, 2018 · 2 comments

Comments

@simondel
Copy link

simondel commented Apr 3, 2018

I am unable to get the migrator running using the following settings:

"source-connection": {
    "account": "https://myAccount.visualstudio.com/",
    "project": "OldProject",
    "access-token": "PersonalAccessTokenWithFullAccess",
    "use-integrated-auth": "false"
  },
  "target-connection": {
    "account": "https://myAccount.visualstudio.com/",
    "project": "NewProject",
    "access-token": "PersonalAccessTokenWithFullAccess",
    "use-integrated-auth": "false"
  },

I used the same PAT for the source and target connection because they are under the same account, just in a different project.

The access-token property is not available in the logging, but that may be by design.


Output:

new work items found:                      0
existing work items found:                 0
existing work items validated for phase 1: 0
existing work items validated for phase 2: 0
Waiting for query to retrieve work items to be validated...
[Info   @16.36.10.326] Starting validation
[Info   @16.36.10.328] Starting configuration validation
[Info   @16.36.10.390] Starting configuration validation for: Source account permissions
[Info   @16.36.10.391] source-post-move-tag is specified, checking write permissions on the source project
[Error   @16.36.10.592] Unexpected error:
Microsoft.VisualStudio.Services.Common.VssUnauthorizedException: TF400813: Resource not available for anonymous access. Client authentication required.
   at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.<SendAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__49.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__46`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<EnsureConnectedAsync>d__39.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<GetAuthorizedIdentityAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.WebApi.VssConnection.get_AuthorizedIdentity()
   at Common.Validation.ValidationHelpers.<CheckConnection>d__5.MoveNext() in C:\dev\temp\vsts-work-item-migrator\Common\Validation\ValidationHelpers.cs:line 26
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Common.Validation.ValidateSourcePermissions.<Validate>d__5.MoveNext() in C:\dev\temp\vsts-work-item-migrator\Common\Validation\Configuration\ValidateSourceClient.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Common.Validation.Validator.<ValidateConfiguration>d__6.MoveNext() in C:\dev\temp\vsts-work-item-migrator\Common\Validation\Validator.cs:line 104
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Common.Validation.Validator.<Validate>d__5.MoveNext() in C:\dev\temp\vsts-work-item-migrator\Common\Validation\Validator.cs:line 26
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at WiMigrator.CommandLine.<ExecuteValidation>d__8.MoveNext() in C:\dev\temp\vsts-work-item-migrator\WiMigrator\CommandLine.cs:line 84
[Info   @16.36.10.614] Summary of errors and warnings:
[Error   @16.36.10.625] Unexpected error:. TF400813: Resource not available for anonymous access. Client authentication required.. TF400813: Resource not available for anonymous access. Client authentication required.```
@obvioussean
Copy link
Member

@simondel Is this still happening? And what permissions did you give the token?

@simondel
Copy link
Author

I gave the permission access to all scopes. It seems like the latest version on the master branch has fixed the issue for me. Thanks! I'll close this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants