Forum Discussion
403 GraphQL API
Hi Team,
We are integrating the Microsoft Fabric API for GraphQL with Salesforce. Our requirement is to retrieve Account data from Microsoft Fabric/Data Lake into Salesforce based on the Account_ID.
Current Implementation
- We have successfully generated a Microsoft Entra ID access token using: Tenant ID, Application (Client) ID & Client Secret
- We are then calling the generated Fabric GraphQL API: https://graphql.fabric.microsoft.com/v1/workspaces/<workspaceid>/graphqlapis/<graphqlid>/graphql
- Sample GraphQL request: query { accounts(first: 10) { items { Account_ID } } }
- Request headers: Authorization: Bearer <ACCESS_TOKEN> Content-Type: application/json
Issue
The GraphQL API call is returning HTTP 403 Forbidden. The response body is empty/null, while the response headers contain the following error:
X-PowerBI-Error-Info: ServicePrincipalIsNotAllowedByTenantAdminSwitch
Based on this error, it appears that the service principal is being blocked by a Fabric tenant-level setting.
Questions
Could you please confirm the following:
- Is the above GraphQL endpoint correct for calling a Fabric API for GraphQL using a Microsoft Entra service principal?
- Where exactly should service-principal access be enabled - Microsoft Fabric Admin Portal / Tenant Settings or Power BI Admin Portal / Tenant Settings or Microsoft Entra ID / Azure Portal
We would appreciate your guidance on the required tenant-level configuration and Fabric permissions so that we can proceed with the Salesforce integration.
Thanks,
Harsh Chandra
2 Replies
- harsh_chandraNew Member
Hi Ibarra,
Thanks for your response.
We have enabled the service principal in the security group. However, when we call the GraphQL endpoint using an Entra ID access token, we receive the following error:
“The current user is not authorized to execute this operation.”
Could you please suggest how we can resolve this issue?
Thanks for your help.
- ibarrau
Super User
Hi. I'm guessing you are missing granting service principals to use fabric api. A fabric administrator can switch this at admin portal - tenant settings:
Make sure your service principal is in a security group in there or the entire org.
I'm not sure about the endpoint yet.
I hope that helps,