如何解决 Tee clc 授权错误
How to resolve Tee clc authorization error
我正在尝试 运行 tf wrokspaces 命令用于我现有的工作空间,因此我可以按照下面的建议在 jetbrains rider 中使用它
Jetbrains Rider Article
当我 运行 命令时,我总是得到以下错误,
"TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.
TF400813: The user 'Windows Live ID\xxxxxxxxxx' is not authorized to access this resource.
com.microsoft.tfs.core.exceptions.TFSAccessException: You do not have permission to access the server."
I have all the necessary permission(i.e. Administrator) on tfs server to run tf workspaces command.
In the log file of tee clc,
"2020-09-10 16:14:13,252 INFO [main] (com.microsoft.tfs.core.telemetry.TfsTelemetryHelper) Command Line Client v.14.134.0.201804261732
2020-09-10 16:14:13,252 INFO [main] (com.microsoft.tfs.core.telemetry.TfsTelemetryHelper) AppInsights telemetry initialized
2020-09-10 16:14:13,252 INFO [main] (com.microsoft.tfs.core.telemetry.TfsTelemetryHelper) Developer Mode: false
2020-09-10 16:14:13,252 INFO [main] (com.microsoft.tfs.core.telemetry.TfsTelemetryHelper) Production Environment: true
2020-09-10 16:14:13,425 INFO [main] (com.microsoft.alm.provider.UserPasswordCredentialProvider) Getting credential that works for uri: https://xxxxx.visualstudio.com/
2020-09-10 16:14:13,425 INFO [main] (com.microsoft.alm.provider.UserPasswordCredentialProvider) Getting credential based on OAuth2 token
2020-09-10 16:14:13,426 INFO [main] (com.microsoft.alm.auth.oauth.OAuth2Authenticator) Ready to launch browser flow to retrieve oauth2 token.
2020-09-10 16:14:13,426 INFO [main] (com.microsoft.alm.auth.oauth.OAuth2Authenticator) Attempt to use oauth2-useragent provider: JavaFx
2020-09-10 16:14:13,427 INFO [main] (com.microsoft.alm.auth.oauth.OAuth2Authenticator) Using oauth2-useragent providers to retrieve AAD token.
2020-09-10 16:14:52,003 INFO [main] (com.microsoft.alm.provider.UserPasswordCredentialProvider) Username exist? true, password exists? true
2020-09-10 16:14:52,089 INFO [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://xxxxxx.visualstudio.com/, authenticating as OAuth2
2020-09-10 16:14:53,186 WARN [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Unable to respond to any of these challenges: {bearer=Bearer authorization_uri=https://login.microsoftonline.com/12fb99fd-4c12-44fb-b3ce-a12ca5aadf63, tfs-federated=TFS-Federated}
2020-09-10 16:14:53,929 WARN [main] (com.microsoft.tfs.core.TFSTeamProjectCollection) Error getting data provider
com.microsoft.tfs.core.exceptions.TFSAccessException: You do not have permission to access the server.
TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.
TF400813: The user 'Windows Live ID\xxxxx' is not authorized to access this resource.
at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:84)
at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:18)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:61)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:617)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:144)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:129)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:275)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:251)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:172)
at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:903)
at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:208)
at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:86)
at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1490)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:376)
at com.microsoft.tfs.client.clc.vc.commands.CommandWorkspaces.displayAndUpdate(CommandWorkspaces.java:295)
at com.microsoft.tfs.client.clc.vc.commands.CommandWorkspaces.run(CommandWorkspaces.java:93)
at com.microsoft.tfs.client.clc.Application.run(Application.java:306)
at com.microsoft.tfs.client.clc.Application.run(Application.java:154)
at com.microsoft.tfs.client.clc.vc.Main.main(Main.java:55)
2020-09-10 16:14:53,932 ERROR [main] (com.microsoft.tfs.client.clc.Application) An error occurred: You do not have permission to access the server.
TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.
TF400813: The user 'Windows Live ID\xxxxxxxx' is not authorized to access this resource.
com.microsoft.tfs.core.exceptions.TFSAccessException: You do not have permission to access the server.
TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.
TF400813: The user 'Windows Live ID\xxxxxxxx' is not authorized to access this resource.
at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:84)
at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:18)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:61)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:617)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:144)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:129)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:275)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:251)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:172)
at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:903)
at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:208)
at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:86)
at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1490)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:376)
at com.microsoft.tfs.client.clc.vc.commands.CommandWorkspaces.displayAndUpdate(CommandWorkspaces.java:295)
at com.microsoft.tfs.client.clc.vc.commands.CommandWorkspaces.run(CommandWorkspaces.java:93)
at com.microsoft.tfs.client.clc.Application.run(Application.java:306)
at com.microsoft.tfs.client.clc.Application.run(Application.java:154)
at com.microsoft.tfs.client.clc.vc.Main.main(Main.java:55)
2020-09-10 16:14:53,933 INFO [main] (com.microsoft.tfs.client.clc.vc.Main) Shutting down
2020-09-10 16:14:53,934 INFO [main] (com.microsoft.tfs.client.clc.vc.Main) Has shut down"
为了验证 tee clc 是否已安装并正常工作,我创建了新组织和 运行 相同的工作区命令。它适用于新组织。同样来自 visual studio 我可以毫无问题地使用我现有的工作区。
请问如何解决授权问题?
谢谢!
要缩小问题范围,请检查以下项目:
检查您的组织是否支持AAD,登录帐户是Windows Live ID\xxxxx
或AAD\xxxxx
。
关闭所有 Visual Studio 个实例,删除 %LOCALAPPDATA%\.IdentityService
,并清除 DevOps 缓存 %LOCALAPPDATA%\Microsoft\Team Foundation\x.0\Cache
。
为此 organization/Project 创建一个新工作区以查看结果如何。
我正在尝试 运行 tf wrokspaces 命令用于我现有的工作空间,因此我可以按照下面的建议在 jetbrains rider 中使用它 Jetbrains Rider Article
当我 运行 命令时,我总是得到以下错误,
"TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.
TF400813: The user 'Windows Live ID\xxxxxxxxxx' is not authorized to access this resource.
com.microsoft.tfs.core.exceptions.TFSAccessException: You do not have permission to access the server."
I have all the necessary permission(i.e. Administrator) on tfs server to run tf workspaces command.
In the log file of tee clc,
"2020-09-10 16:14:13,252 INFO [main] (com.microsoft.tfs.core.telemetry.TfsTelemetryHelper) Command Line Client v.14.134.0.201804261732
2020-09-10 16:14:13,252 INFO [main] (com.microsoft.tfs.core.telemetry.TfsTelemetryHelper) AppInsights telemetry initialized
2020-09-10 16:14:13,252 INFO [main] (com.microsoft.tfs.core.telemetry.TfsTelemetryHelper) Developer Mode: false
2020-09-10 16:14:13,252 INFO [main] (com.microsoft.tfs.core.telemetry.TfsTelemetryHelper) Production Environment: true
2020-09-10 16:14:13,425 INFO [main] (com.microsoft.alm.provider.UserPasswordCredentialProvider) Getting credential that works for uri: https://xxxxx.visualstudio.com/
2020-09-10 16:14:13,425 INFO [main] (com.microsoft.alm.provider.UserPasswordCredentialProvider) Getting credential based on OAuth2 token
2020-09-10 16:14:13,426 INFO [main] (com.microsoft.alm.auth.oauth.OAuth2Authenticator) Ready to launch browser flow to retrieve oauth2 token.
2020-09-10 16:14:13,426 INFO [main] (com.microsoft.alm.auth.oauth.OAuth2Authenticator) Attempt to use oauth2-useragent provider: JavaFx
2020-09-10 16:14:13,427 INFO [main] (com.microsoft.alm.auth.oauth.OAuth2Authenticator) Using oauth2-useragent providers to retrieve AAD token.
2020-09-10 16:14:52,003 INFO [main] (com.microsoft.alm.provider.UserPasswordCredentialProvider) Username exist? true, password exists? true
2020-09-10 16:14:52,089 INFO [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for https://xxxxxx.visualstudio.com/, authenticating as OAuth2
2020-09-10 16:14:53,186 WARN [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Unable to respond to any of these challenges: {bearer=Bearer authorization_uri=https://login.microsoftonline.com/12fb99fd-4c12-44fb-b3ce-a12ca5aadf63, tfs-federated=TFS-Federated}
2020-09-10 16:14:53,929 WARN [main] (com.microsoft.tfs.core.TFSTeamProjectCollection) Error getting data provider
com.microsoft.tfs.core.exceptions.TFSAccessException: You do not have permission to access the server.
TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.
TF400813: The user 'Windows Live ID\xxxxx' is not authorized to access this resource.
at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:84)
at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:18)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:61)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:617)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:144)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:129)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:275)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:251)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:172)
at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:903)
at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:208)
at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:86)
at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1490)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:376)
at com.microsoft.tfs.client.clc.vc.commands.CommandWorkspaces.displayAndUpdate(CommandWorkspaces.java:295)
at com.microsoft.tfs.client.clc.vc.commands.CommandWorkspaces.run(CommandWorkspaces.java:93)
at com.microsoft.tfs.client.clc.Application.run(Application.java:306)
at com.microsoft.tfs.client.clc.Application.run(Application.java:154)
at com.microsoft.tfs.client.clc.vc.Main.main(Main.java:55)
2020-09-10 16:14:53,932 ERROR [main] (com.microsoft.tfs.client.clc.Application) An error occurred: You do not have permission to access the server.
TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.
TF400813: The user 'Windows Live ID\xxxxxxxx' is not authorized to access this resource.
com.microsoft.tfs.core.exceptions.TFSAccessException: You do not have permission to access the server.
TF31003: Either you have not entered the necessary credentials or your user account does not have permission to connect to the Team Foundation Server at https://tfs.app.visualstudio.com/. Ask your server administrator to add the appropriate permissions to your account.
TF400813: The user 'Windows Live ID\xxxxxxxx' is not authorized to access this resource.
at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:84)
at com.microsoft.tfs.core.exceptions.mappers.RegistrationExceptionMapper.map(RegistrationExceptionMapper.java:18)
at com.microsoft.tfs.core.clients.registration.RegistrationData.newFromServer(RegistrationData.java:61)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationData(RegistrationClient.java:617)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:144)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.getRegistrationEntries(RegistrationClient.java:129)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.findServiceLocation(PreFrameworkServerDataProvider.java:275)
at com.microsoft.tfs.core.PreFrameworkServerDataProvider.locationForCurrentConnection(PreFrameworkServerDataProvider.java:251)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getServerDataProvider(TFSTeamProjectCollection.java:172)
at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:903)
at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:208)
at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:86)
at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1490)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:376)
at com.microsoft.tfs.client.clc.vc.commands.CommandWorkspaces.displayAndUpdate(CommandWorkspaces.java:295)
at com.microsoft.tfs.client.clc.vc.commands.CommandWorkspaces.run(CommandWorkspaces.java:93)
at com.microsoft.tfs.client.clc.Application.run(Application.java:306)
at com.microsoft.tfs.client.clc.Application.run(Application.java:154)
at com.microsoft.tfs.client.clc.vc.Main.main(Main.java:55)
2020-09-10 16:14:53,933 INFO [main] (com.microsoft.tfs.client.clc.vc.Main) Shutting down
2020-09-10 16:14:53,934 INFO [main] (com.microsoft.tfs.client.clc.vc.Main) Has shut down"
为了验证 tee clc 是否已安装并正常工作,我创建了新组织和 运行 相同的工作区命令。它适用于新组织。同样来自 visual studio 我可以毫无问题地使用我现有的工作区。
请问如何解决授权问题?
谢谢!
要缩小问题范围,请检查以下项目:
检查您的组织是否支持AAD,登录帐户是
Windows Live ID\xxxxx
或AAD\xxxxx
。关闭所有 Visual Studio 个实例,删除
%LOCALAPPDATA%\.IdentityService
,并清除 DevOps 缓存%LOCALAPPDATA%\Microsoft\Team Foundation\x.0\Cache
。为此 organization/Project 创建一个新工作区以查看结果如何。