Create a MS Dev Box with API

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

I call the 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:
The jwt token retrieved with the CLI is encrypted
The browser “Try it” function under (https://learn.microsoft.com/de-de/rest/api/devcenter/developer/dev-boxes/create-dev-box?view=rest-devcenter-developer-2023-04-01) is also not working, when I log in with the account which should be able to create a dev box. (401)

Any ideas?