Power BI Report Throws an Error “Principalobjectat…


Issue: Power BI report throws error “principalobjectattributeaccessset” while refreshing from Power BI Desktop.

Error:

Principalobjectattributeaccessset. Failed to save modifications to the server. Error returned: ‘OLE DB or ODBC error: Exception of type ‘Microsoft.Mashup.Engine.Interface.ResourceAccessForbiddenException’ was thrown.. ‘.

monaraya_0-1597208443949.png

Data Source: Dynamics CRM connected through OData feed.

Cause: The error originates from data source “Dynamics CRM” and can be confirmed, if we collect a Fiddler trace. We would be able to see the below details: –

Fiddler Trace:

Frame 154: Error 403

GET /api/data/v9.1/principalobjectattributeaccessset?$select=principalobjectattributeaccessid%2C_principalid_value%2Creadaccess%2Cattributeid%2Cversionnumber%2Cupdateaccess%2C_organizationid_value%2C_objectid_value HTTP/1.1

message=Principal user (Id=XXX, type=8, roleCount=4, privilegeCount=539, accessMode=0), is missing prvReadPrincipalObjectAttributeAccess privilege (Id=XXX) on OTC=44 for entity ‘principalobjectattributeaccess’. context.Caller=XXX

stacktrace=   at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.RetrieveMultiple(QueryBase query, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, Guid appModuleId, Dictionary`2 optionalParameters)

Resolution:

Assign the CRM System Administrator Role to the user trying to refresh report in Power BI Desktop. In this case, the customer has refreshed all previous reports in Desktop and then reverted the sys admin change.

The additional recommendation is to create a custom role in Dynamics for, let’s say, “PBI Reports Admin”, where you can customize what the user can do from a Read-Write-Update perspective on the records.

 

References on how to assign CRM System Admin Role: –

Author: @srsharma

Reviewer:@monaraya

 

 



Source link

Be the first to comment

Leave a Reply

Your email address will not be published.


*