skip to Main Content

I have currently problems with the token for the MS Dev Center service.

I call the REST API PUT {endpoint}/projects/{projectName}/users/{userId}/devboxes/{devBoxName}?api-version=2023-04-01 with a Bearer token like described:
AAD Token

  • I have the right authority.
  • I have the right scope "user_impersonation"
  • I use the implicit oauth2 flow

I successfully retrieved the token with the CLI:

az account get-access-token --resource https://devcenter.azure.com

but when I use the interactive flow in my react app, I get a 401.

Observations:

Any ideas?

2

Answers


  1. Chosen as BEST ANSWER

    In the Microsoft documentation it says you need to use the user_impersonation scope.

    I solved it by configuring the "Fidalgo Dataplane Public" API with "access_as_user" scope in my app registration.

    Fidalgo Dataplane Public


  2. It wasn’t exactly clear in your post but ensure you have the Dev Box User Role on the project with a Dev Box Pool.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search