Could not grant admin consent. Your organization does not have a subscription (or service principal) for the following API(s): Power BI Service

Clear Quote 0 Reputation points
2024-02-25T17:28:21.17+00:00

User's image

I am not able to Grant API Permissions for my app
PBI Embedded Demo

Receiving below error:
Could not grant admin consent. Your organization does not have a subscription (or service principal) for the following API(s): Power BI Service 

please provide me detailed step-by-step solution for this error

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. Andrzej Strzała 0 Reputation points
    2024-02-25T20:52:03.1533333+00:00

    There might be few potential causes for this issue.

    Lack of Power BI Subscription - so your organization must have an active Power BI subscription or be allowed to use Power BI services to integrate with Power BI APIs. This includes Power BI Pro for users who will be distributing content and Power BI Premium for capacity-based service features, including embedding analytics.

    Insufficient Permissions in Azure AD
    The specific permissions you need to grant depend on what your application aims to do with Power BI. However, common permissions include:

    • Dataset.Read.All: Allows the app to read all datasets.
    • Report.Read.All: Allows the app to read all reports.
    • Dashboard.Read.All: Allows the app to read all dashboards.
    • Group.Read.All: Allows reading metadata and the content of groups.
    • Content.Create: Allows the app to create content in Power BI. For embedding scenarios, you might also need permissions like App.Read.All and Workspace.ReadWrite.All, depending on whether your app needs to read app metadata or manage workspaces.

    Step by step to grant permissions:

    1. Navigate to Azure Active Directory: Log in to the Azure Portal and select Azure Active Directory from the services list.
    2. App Registrations: Go to "App registrations" and select the application you're working with (e.g., "PBI Embedded Demo").
    3. API Permissions: In the application's overview page, find and click on "API permissions".
    4. Add a Permission: Click on "Add a permission", then choose "APIs my organization uses". Search for "Power BI Service" and select it.
    5. Request Permissions: You'll see options for Delegated Permissions and Application Permissions:
      • Delegated Permissions are used when calls are made on behalf of a user.
      • Application Permissions are used when calls are made as the application itself.
    6. Select Required Permissions: Based on your application's needs, select the appropriate permissions (e.g., Dataset.Read.All, Report.Read.All). After selecting, click on "Add permissions" at the bottom.
    7. Grant Admin Consent: Once the permissions are added, you need to grant admin consent for these permissions to take effect. This step requires Azure AD admin privileges. Click on "Grant admin consent for [Your Organization]" and confirm.

    Power BI Service Not Registered in Azure AD - for your Azure AD tenant to interact with Power BI services, PBI must be registered within your Azure Active Directory (Azure AD) as an API permission. It should be pre-registered application in Azure AD so this should not be an issue.If it's not registered or recognized, you might need to look at this as well.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.