Forum Discussion
Issue with Microsoft.AnalysisServices v19.96.1 – “API is not accessible for application” Error
Hi everyone,
I'm currently facing an issue while trying to connect to a Power BI workspace using the Microsoft.AnalysisServices library in our C# backend code.
Here’s the snippet we’re using:
string workspaceName = await _utilityService.GetWorkspaceName(WorkspaceID);
string connectionString = _utilityService.GetConnectionString(workspaceName);
string catalog = DatasetName;
Server server = new Server();
server.Connect(connectionString);
This works perfectly when we use Microsoft.AnalysisServices v19.90.0.
However, when we upgrade to v19.96.1, the following error occurs during connection:
{
"errorMessage": "PowerBI Request Failed.\r\n\r\nAction: Resolving the PBI workspace\r\n\r\nDescription: {\"Message\":\"API is not accessible for application\"}\r\n\r\nTechnical Details:\r\nRootActivityId: 9f71dfbb-fe3f-47de-9c7e-770b29bee817",
"statusCode": 500
}Has anyone else encountered this issue after upgrading to v19.96.1?
Is this a known change in how authentication or API access is handled in newer versions?
Do we need additional permissions, headers, or configuration with the newer version?
Any guidance or insights would be greatly appreciated!
Thanks in advance!
Hi Anonymous ,
1. Test with Delegated Flow (vs Application Permissions)Try switching from Application permissions (client credentials) to a delegated flow (user context + token) and see if that bypasses the block. This is just to isolate whether v19.96.1 disallows service principal-only flows.
If this doesnt work try switching back to previous version until Microsoft Resolves.You can raise the concern here:
https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues
or
Try raising a Support Ticket-
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
Thank you for reaching out on Microsoft Community Forum.
5 Replies
- BhavinVyas3003
Super User
Ensure your app registration has:
- Tenant.Read.All or Capacity.Read.All API permissions (delegated or application, depending on your scenario) in Azure AD
- Admin consent granted
- Power BI workspace access for the service principal
You may also need to enable “Allow service principals to use Power BI APIs” in Power BI Admin Portal.
- AnonymousNot applicable
Yes, all the mentioned permissions are present. But, it isn't working for us with Microsoft.AnalysisServices v19.96.1 but working with Microsoft.AnalysisServices v19.90.0.
- v-sdhruv
Community Support
Hi Anonymous ,
1. Test with Delegated Flow (vs Application Permissions)Try switching from Application permissions (client credentials) to a delegated flow (user context + token) and see if that bypasses the block. This is just to isolate whether v19.96.1 disallows service principal-only flows.
If this doesnt work try switching back to previous version until Microsoft Resolves.You can raise the concern here:
https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues
or
Try raising a Support Ticket-
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
Thank you for reaching out on Microsoft Community Forum.- AnonymousNot applicable
We can't change our app flow. So, raising a ticket in issue section as you mentioned.
- v-sdhruv
Community Support
Hi Anonymous ,
I hope you were able to successfully raise a ticket and got help with resolving the issue.
We are closing this ticket. If you still need any assistance, please feel to reach out and create a seperate ticket.
Thank you for being a part of Microsoft Community Forum.