You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a service connection in devops, and gave it the correct permissions to add a resource to the new environment. This works for our dev environment but in test it initially failed with a permission error not having access to the environment. Now it is failing with environment not found.
First error (Now Resolved):
[2024-03-19 18:45:15Z INFO Terminal] WRITE LINE: >> Register Agent:
[2024-03-19 18:45:15Z INFO Terminal] WRITE LINE:
[2024-03-19 18:45:15Z INFO CommandSettings] Arg 'projectname': 'xxx'
[2024-03-19 18:45:15Z INFO EnvironmentVMResourceConfigProvider] vm resource will be configured against the environment 'test'
[2024-03-19 18:45:15Z ERR VisualStudioServices] GET request to https://dev.azure.com/xxx/cloud/_apis/pipelines/environments failed. HTTP Status: Unauthorized, AFD Ref: Ref A: 8AB1D7D71B714FC897F693ED6BF4A376 Ref B: BL2AA2030109037 Ref C: 2024-03-19T18:45:15Z
[2024-03-19 18:45:15Z INFO CommandSettings] Flag 'unattended': 'True'
[2024-03-19 18:45:15Z ERR Agent] Microsoft.VisualStudio.Services.Common.VssServiceException: TF400813: The user 'xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx' is not authorized to access this resource.
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponseAsync(HttpResponseMessage response, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync(HttpRequestMessage message, HttpCompletionOption completionOption, Object userState, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync[T](HttpRequestMessage message, Object userState, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.SendAsync[T](HttpMethod method, IEnumerable`1 additionalHeaders, Guid locationId, Object routeValues, ApiResourceVersion version, HttpContent content, IEnumerable`1 queryParameters, Object userState, CancellationToken cancellationToken)
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.EnvironmentVMResourceConfigProvider.GetEnvironmentAsync(String projectName, String environmentName) in D:\a\1\s\src\Agent.Listener\Configuration\ConfigurationProvider.cs:line 572
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.EnvironmentVMResourceConfigProvider.GetPoolIdAndName(AgentSettings agentSettings, CommandSettings command) in D:\a\1\s\src\Agent.Listener\Configuration\ConfigurationProvider.cs:line 456
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.ConfigureAsync(CommandSettings command) in D:\a\1\s\src\Agent.Listener\Configuration\ConfigurationManager.cs:line 197
at Microsoft.VisualStudio.Services.Agent.Listener.Agent.ExecuteCommand(CommandSettings command) in D:\a\1\s\src\Agent.Listener\Agent.cs:line 103
[2024-03-19 18:45:15Z ERR Terminal] WRITE ERROR: TF400813: The user 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx' is not authorized to access this resource.
New error:
[2024-03-19 22:13:13Z INFO Terminal] WRITE LINE: >> Register Agent:
[2024-03-19 22:13:13Z INFO Terminal] WRITE LINE:
[2024-03-19 22:13:13Z INFO CommandSettings] Arg 'projectname': 'xxx'
[2024-03-19 22:13:13Z INFO EnvironmentVMResourceConfigProvider] vm resource will be configured against the environment 'test'
[2024-03-19 22:13:13Z INFO CommandSettings] Flag 'unattended': 'True'
[2024-03-19 22:13:13Z ERR Agent] Microsoft.TeamFoundation.DistributedTask.WebApi.EnvironmentNotFoundException: Environment not found: 'test'
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.EnvironmentVMResourceConfigProvider.GetEnvironmentAsync(String projectName, String environmentName) in D:\a\1\s\src\Agent.Listener\Configuration\ConfigurationProvider.cs:line 576
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.EnvironmentVMResourceConfigProvider.GetPoolIdAndName(AgentSettings agentSettings, CommandSettings command) in D:\a\1\s\src\Agent.Listener\Configuration\ConfigurationProvider.cs:line 456
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.ConfigureAsync(CommandSettings command) in D:\a\1\s\src\Agent.Listener\Configuration\ConfigurationManager.cs:line 197
at Microsoft.VisualStudio.Services.Agent.Listener.Agent.ExecuteCommand(CommandSettings command) in D:\a\1\s\src\Agent.Listener\Agent.cs:line 103
[2024-03-19 22:13:13Z ERR Terminal] WRITE ERROR: Environment not found: 'test'
Versions
agent v3.227.2 / windows 10
Environment type (Please select at least one enviroment where you face this issue)
Self-Hosted
Microsoft Hosted
VMSS Pool
Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Operation system
windows 10
Version controll system
No response
Azure DevOps Server Version (if applicable)
No response
The text was updated successfully, but these errors were encountered:
This was resolved. Turns out the service connection we were using only had a stakeholder license. Once it was given a basic license everything started working.
Describe your question
We have a service connection in devops, and gave it the correct permissions to add a resource to the new environment. This works for our dev environment but in test it initially failed with a permission error not having access to the environment. Now it is failing with environment not found.
First error (Now Resolved):
New error:
Versions
agent v3.227.2 / windows 10
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Operation system
windows 10
Version controll system
No response
Azure DevOps Server Version (if applicable)
No response
The text was updated successfully, but these errors were encountered: