web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / BUG: RetrievePrincipal...
Power Apps
Unanswered

BUG: RetrievePrincipalAccessRequest

(0) ShareShare
ReportReport
Posted on by 4,702 Moderator

FYI to the community, it looks like we have a bug in the latest Dataverse release (9.2.21104.147) related to the API message RetrievePrincipalAccessRequest.

 

Using a well-formed request message which worked prior to latest release, orgService.Execute now throws an unhandled null dereferencing exception. This error is further demonstrated by using a RetrieveSharedPrincipalAccessRequest message to retrieve a set of rows which should be valid for RetrievePrincipalAccessRequest, yet all of them still throw the same exception. This is observed in plugin execution context as well as when using an authenticated console app connecting with the proxy service.

 

To reproduce:

- retrieve all principals with access to a given target with RetrieveSharedPrincipalsAndAccessRequest

- loop though principals and use the response to call RetrievePrincipalAccessRequest

*Throws an unhandled null dereferencing exception inside orgService.execute

 

var request = new RetrieveSharedPrincipalsAndAccessRequest
{
	Target = entityRef
};

var response = (RetrieveSharedPrincipalsAndAccessResponse)orgService.Execute(request);

foreach(var access in response.PrincipalAccesses)
{
	var otherRequest = new RetrievePrincipalAccessRequest
	{
		Target = entityRef,
		Principal = new EntityReference(access.Principal.LogicalName, access.Principal.Id)
	};

	var otherResponse = (RetrievePrincipalAccessResponse)orgService.Execute(otherRequest);
}

 

 

The workaround for this is implicit in the proof of the bug. Instead of using RetrievePrincipalAccessRequest, one needs to use RetrieveSharedPrincipalsAndAccessRequest instead, then loop through the results to find the expected Principal. This is a valid workaround, but should not be necessary as this is a breaking change to a well-established API message.

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 531 Most Valuable Professional

#2
Haque Profile Picture

Haque 261

#3
Kalathiya Profile Picture

Kalathiya 221 Super User 2026 Season 1

Last 30 days Overall leaderboard