Have you taken a look at the new Common Data Service (Current Environment) connector within Power Automate?
If so, you may have seen some of the new actions you have available to you, when built within the context of a solution. More specifically Bound and Unbound Actions.
Recently, I had the need to automatically share records to an Owner team after creation, but identifying the proper format wasn't very straight forward. So I wanted to outline the steps below:
In order to use this connector, you must be within the context of a solution. When you use this connector, you will have multiple options to trigger the Flow compared to the standard CDS connector
In this case, I am choosing the trigger on Create. Then, you will search again for the Common Data Service (Current Environment) connector. This time it will give you the different actions. Since this action is not bound to an entity, we are going to chose Perform an unbound action.
Then, I can search for my action.
The format for the Target needs to be entitylogicalname(recordid), which you can pull as a Dynamic value from the creation trigger, in this case.
Below, you will see the proper formatting for the input values of PrincipalAccess. This is where I initially ran into issues with formatting. This needs to be in JSON format to provide the user or team that will be granted access to the record and the Access Mask for the privilege they will receive. You need to escape the @symbol for odata.type in order for this to be recognized as proper JSON format.
Here is some additional documentation on the GrantAccess action.
I hope this helps.
Aaron Richards
*This post is locked for comments