Forum Discussion
Anyone able to use Get Model API with Power Platform custom connector?
- 1 year ago
Hi arpost,
Thank you for your follow-up.
When using the HTTP with Azure AD action in Power Automate, pre-authorization is managed automatically through client credentials. You only need to configure the action with the appropriate Azure AD details, and Power Automate will handle token acquisition seamlessly in the background.
If you find our response helpful, kindly consider marking it as the accepted solution and providing kudos. This will greatly assist other members of the community who may have similar queries.
Should you have any further questions, please feel free to reach out to the Microsoft Fabric community.
Thank you.
Hi arpost,
Thank you for your follow-up.
1.You are utilising a service principal that authenticates via the client credentials flow, a machine-to-machine authentication method which does not involve user interaction. However, the Power BI (and Fabric) REST APIs such as Get Model currently expose permissions like Dataset.Read.All and SemanticModel.Read.All only as delegated permissions within Azure AD. Despite this, these APIs do support service principals, provided the token is acquired using the client credentials flow, which is the method you are employing. It is important to note that these permissions will not appear under the Application Permissions tab in Azure AD, and this is expected behaviour rather than an error in your configuration.
2.There is a limitation with Power Platform Custom Connectors. Custom connectors in Power Apps and Power Automate do not support the client credentials flow. They are restricted to OAuth 2.0 delegated (authorization code) flows, which necessitate a signed-in user—a condition that is not applicable for service principals. Therefore, even if your service principal is correctly configured and the necessary permissions are granted, your custom connector will continue to fail with an "InsufficientScopes" error because it attempts to use an authentication flow that does not correspond to the correct authentication context.
You may circumvent this limitation by using Power Automate’s HTTP with Azure AD action, which does support the client credentials flow.
If you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members encountering similar queries. Should you have any further questions, please feel free to reach out to the Microsoft Fabric community.
Thank you.
I appreciate the detailed reply; sorry for the delay. I’m headed OOO and had some things to finish.
When you say use the Power Automate HTTP action, are you saying preauthorized should work, or am I going to have to set up a process to get a bearer token?