microsoft / powerapps-tools

Unsupported PowerApps Tools & Apps
MIT License
1.06k stars 439 forks source link

[BUG]: Cleanup Old Objects App when Power Platform Maker SR Role is missing permissions and it pulls orphans even if the person is not a maker #1264

Open mdphung opened 11 months ago

mdphung commented 11 months ago

The Maker SR Role had no read or write permissions for the Archive Approval which affected the use of Clean up Old Objects App.

You don't have permission to view this data. Server Response: Archive Approvals failed: Principal user (Id=14510909-8fd9-ed11-a7c7-001dd80702fd, type=8, roleCount=2, privilegeCount=35, accessMode=0, MetadataCachePrivilegesCount=8112, businessUnitId=a1230952-68cc-ed11-b596-001dd804fc9d), is missing prvReadadmin_ArchiveApproval privilege (Id=5dce1ec8-944c-4fe9-9b43-1439efe28ed3) on OTC=10746 for entity 'admin_archiveapproval' (LocalizedName='Archive Approval '). context.Caller=14510909-8fd9-ed11-a7c7-001dd80702fd. Consider adding missed privilege to one of the principal (user/team) roles.

Issue with Power Platform Maker SR role: image

I added it on this screenshot to fix my issues, but they were removed when i reviewed it.

Another issue: Had an account that does not have a maker record and there is seems to be a query that is passed the makerid so it looks like this specific user gets back all the orphans even if there is no maker record.