Error : Could not retrieve Global Service Principal ID Error: Error: {} when Approve the requested Microsoft Graph permissions

Binu Thomas 146 Reputation points
2022-11-01T12:33:03.067+00:00

Hi All,

I am creating my first SPFX application using Microsoft Graph Api

I followed this link https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-microsoft-graph-apis

But when it reached to the step to Approve the requested Microsoft Graph permissions

I get below error and my page is empty256104-image.png

what could be the issue, I tired to search for this error and couldn't find much help.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,392 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,252 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. Binu Thomas 146 Reputation points
    2022-11-02T06:38:18.15+00:00

    I found the issue, As i was doing it for the first time, i had to run the below command. Now that error is gone.

    Enable-SPOTenantServicePrincipal

    Thank you

    0 comments No comments