Business Requirement: We often encounter situations where a record has been shared with multiple users, but later we need to revoke that access. The challenge is that we may not know who the record was originally shared with. If we had visibility into the list of users with whom the record was shared, we could easily unshare it from those users and grant access to the correct set of people.
Is there a way to identify all users a record has been shared with over time, so that we can revoke their access and then re-share the record with the appropriate users?
Solution: Yes, we can list the shares done on a record. We all know about the POA table in Dynamics but is there a way we can query it ? Yes we can! & that too with Power Automate itself.
See the flow below:

Step 1: We can query the table by using “List Rows” as follows:

PS: In filter rows, give the table logic name & record guid
Step 2: Use the “Perform an unbound action” [Revoke Access].

PS: The object ID contains the guid of the record & PrincipalID contains the guid of the user it was shared with.
Tip: It was not letting me save the flow until i applied two-@@ before odata.type though finally it appears as one@ ! So you may try the same.
Voila, there you have it! It’s a simple approach, but one that can be extremely useful in a variety of scenarios.
You can also fine-tune the logic around the access mask based on your requirements. For example, if you only want to revoke shares that were granted with Write access while retaining Read access, the same approach can be adapted accordingly.
Similarly, in cases where you want to preserve the owner’s shared permissions while removing access for others, you can customize the logic to align with your specific business needs. The flexibility of this approach makes it applicable to a wide range of access management scenarios.
Happy Sharing!
& the Power Quote of the Day is:
“Success is not final, failure is not fatal: it is the courage to continue that counts.”
— Winston Churchill
Thus today’s takeaway is: Progress belongs to those who keep moving forward, especially when the path is uncertain. 🚀

























































