How do I enable Grap Explorer to use a Metered API

Ludwig Wurmannstätter 0 Reputation points
2023-10-12T12:56:07.3833333+00:00

For development purposes and to test stuff out I very often use the really helpful "Graph explorer".

Lastly I tested to apply a Information protection Sensitivity label to a document on SharePoint Online. To do this one needs to enable the App to use the "Metered API". This is normally done by using this prompt in Bash or PowerShell:

az resource create --resource-group 'rg-everything-unassigned' --name 'myEnterpriseGraphExplorerBilling' --resource-type Microsoft.GraphServices/accounts --properties '{""appId"": ""here comes the AppId""}' --location 'Global' --subscription 'here comes your subscription Id'

This is working on Apps I created in Microsoft Entra ID - App registrations.

But when I try to do the same in my tenant by using my Graph explorer Application Id it gives an Error saying "(BadRequest) The application was not found in this tenant".

The difference is, Graph explorer is an Enterprise Application vs. the others are Applications registered by myself.

Q is, how can I enable Graph explorer to use the Metered API? Or the other way round, am I able to register Graph explorer myself?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,839 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 37,786 Reputation points
    2023-10-13T07:30:02.8666667+00:00

    Hi @Ludwig Wurmannstätter

    Grap Explorer is a testing tool that should only be used for testing purposes, for example you can log into the tool to call the graph API endpoint.

    Do not use the Grap Explorer app in your production, because it is essentially a multi-tenant application. When you log into the Grap Explorer app, it will join your organization as an enterprise app, but you can't manage the app.

    You should create your own app in Microsoft Entra ID, which is more secure and easier to manage.

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.