javascriptazurerestoauth-2.0azure-dev-box

Create a MS Dev Box with API


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 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?


Solution

  • 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