Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

361
Visualizações
Access Denied when GET User Entitlement by ID using .NET Client for REST API

I'm trying to use the Azure DevOps Member Entitlement Management REST API to get a user by ID using the .NET Client.

I've set up a Personal Access Token (PAT) which includes Member Entitlement Management (Read) and Entitlements (Read), among other scopes.

When I call the Search endpoint I get a list of UserEntitlement, but the GET endpoint throws the exception:

Access Denied: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx needs the following permission(s) on the resource Users to perform this action: ReadExtended Users

I don't know what this means... how do I add "ReadExtended Users" to the Users resource? I've looked through PAT scopes and user permissions and I can't find it.

Any why is it that I can list ALL users, but not get a single user by ID?? The documentation implies that the same permissions are required for both, and the returned objects are the same type (UserEntitlement).

Here's some code:

var uri = new Uri("https://vssps.dev.azure.com/MY_ORGANIZATION");
var credentials = new VssBasicCredential("", "PAT");
using (var connection = new VssConnection(uri, credentials))
using (var client = connection.GetClient<MemberEntitlementManagementHttpClient>())
{
  return client.GetUserEntitlementAsync(new Guid("USER_ID")).Result;
}

I'm using v15.131.1 of the client API, .NET Fx 4.5.2. Yes, it a bit outdated but it's based on the Quickstart samples and the target project is .NET Fx.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Access Denied: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx needs the following permission(s) on the resource Users to perform this action: ReadExtended Users

I could reproduce this issue when run the User Entitlements - Get Rest API.

To solve this issue, you need to add the user to Project Collection Administrators Group in Organization Settings -> Permissions.

Then you could run the API successfully.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda