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

Biotek Demo 40 Reputation points
2023-10-30T11:19:56.2866667+00:00

We are trying to build the wrap feature in Power Apps to create native mobile versions. In that we are getting an error as following ,while grant tenant-wide admin consent through the Enterprise applications.

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

Here there is a steps for Register App , there we got an error ,such as "Admin consentAAD App ID" , "Service Principals not configured".

So we required your support and advice to proceed further steps.

User's image

User's image

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,454 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,986 questions
0 comments No comments
{count} votes

Accepted answer
  1. Akshay-MSFT 17,961 Reputation points Microsoft Employee Moderator
    2023-11-01T14:26:30.5166667+00:00

    @Biotek Demo

    Thank you for posting your query on Microsoft Q&A, from above description I could understand that you are trying to follow canvas app wrap from power Apps but it is failing due to lacking permission for Azure API connection and getting error:

    AADSTS650052: The app is trying to access a service fe053c5f-3692-4f14-aef2-ee34fc081cae'(Azure API Connections) that your organization 'xxxx-xxxxx-xxxx-xxxx-ace4-8dd5f92b4c2b' lacks a service principal for.

    Please do correct me for any discrepancies by responding in the comments section.

    As the error says, seems like Azure API Connections was missing in the My API section of the registered app.

    Kindly follow the given steps to have this API added in your Entra ID tenant:

    • Install Module Microsoft Graph PowerShell
    PS C:\WINDOWS\system32> Install-Module -Name Microsoft.Graph
    
    • Connect Graph and give Application Read.Write permission on your Entra Tenant: A pop up window will appear to login with your admin credentials and seeking consent to add scope
    PS C:\WINDOWS\system32> Connect-MgGraph -Scopes "Application.ReadWrite.All", "DelegatedPermissionGrant.ReadWrite.All"
    
    
    
    • Now add the Azure API connection service pricipal:
    PS C:\WINDOWS\system32> New-MgServicePrincipal -AccountEnabled -AppId fe053c5f-3692-4f14-aef2-ee34fc081cae -DisplayName "Azure API Connections"
    

    ***You would see an output like below confirming the API has been added: User's image


    • Now Navigate to the Entra ID> Registered Apps > Look for your application name registered for canvas app > API permission > Add permission > API My organization Uses and choose Azure API Connections > Add Permission

    User's image

    User's image

    • Once Done, you may retry the wrap process.

    Thanks,

    Akshay Kaushik

    Please "Accept the answer" (Yes), and share your feedback if the suggestion answers you’re your query. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful

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.