Unable to set permissions to use Azure lab services REST API

SpacebankInc 0 Reputation points
2023-08-03T06:49:10.3166667+00:00

Hello,

I have created a lab plan and made the lab available using Azure's Lab Services API. Then, I created a token, but it didn't work for me. It returned the following message:

{

    "error": {

        "code": "AuthorizationFailed",

        "message": "The client 'my-id' with object id 'my-id' does not have authorization to perform action 'Microsoft.LabServices/labPlans/read' over scope '/subscriptions/my-id/resourceGroups/Spacebank-dev/providers/Microsoft.LabServices/labPlans/Spacebank-CNU-test' or the scope is invalid. If access was recently granted, please refresh your credentials."

    }

}

I followed the documentation with these steps:

  1. Login to Azure Portal.
  2. Select "Azure Active Directory" > "Application Registrations" in the left menu.
  3. Select the app.
  4. Click on the "API permissions" tab and the "Add a permission" button.
  5. Select the "Microsoft APIs" tab, and if Lab Services is not listed, navigate to "All APIs" and search for or type in "Microsoft.LabServices" to add it.

However, I couldn't find a permission related to lab services in any of the items. Is there another way to proceed or something I may have missed?

Thank you for your assistance.

Azure Lab Services
Azure Lab Services
An Azure service that is used to set up labs for classrooms, trials, development and testing, and other scenarios.
280 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,562 questions
{count} votes