Forum Discussion

    • tony-derricott's avatar
      tony-derricott
      Gold Contributor

      Nuno Mota 

      I'm getting all the way to the point where I get the following error:

      Unable to query Graph API: 'The remote server returned an error: (401) Unauthorized.'

      Have tried with my own Global Admin and with admin@tenant.onmicrosoft.com.

      • Nuno Mota's avatar
        Nuno Mota
        Copper Contributor

        You don't need any special account in Office 365/Azure in order to run the script (actually, just run it with your normal/local account!). What you need to do is go to the Azure management portal (portal.azure.com), then go to "App registrations", and click on "New registration". From there, give it a name, create a secret, and in "API permissions" give it the permissions I mention in the script for "Microsoft Graph".

        Then, you use the details from the app registration to update the $ClientID, $ClientSecret, and $TenantID properties in the script. This is what the script uses to authenticate against Graph API and retrieve all the information from meeting rooms.

Resources