{Step by Step}Share record with a user using Unbound action in Power Automate

Requirement:

In this blog, we will learn how to share records from Microsoft Dataverse to a user with the help of using an Unbound action in Power Automate, In Power Automate, an unbound action is a type of custom action that is not associated with a specific entity or record in a Dynamics 365 environment. It is a standalone action that can be called from any workflow or automation.

Implementation:

  • Go to https://make.powerapps.com.
  • Sign into Power apps.
  • Click on “Flows” from the left navigation panel > “+New flow.”
  • Select “Automated cloud flow.”
  • Give a title to your flow.
  • Search for the Microsoft Dataverse trigger “When a row is added, modified, or deleted.”
  • Select the Microsoft trigger.
  • Click on “Create.”
  • Select “Added” in the Change type.
  • Select an entity, we have selected an “Accounts” entity here.
  • Select “Organization” in the scope field.
  • Click on “+New step” for adding action.
  • Search for “Perform unbound action.”
  • Select Microsoft Dataverse action “Perform an unbound action.”
  • Select “GrantAccess” in the action name field.
  • In the target field enter entitylogicalname-plurarl(recordid) or entitylogicalname-plurarl/recordid.
  • You can add the dynamic id of the entity, we have added a dynamic id.
  • PrincipalAccess includes the user or team to which access will be provided and the Access Mask for the Privilege, in JSON format.
  • Click on “+New step.”

Tips: In this blog, we gave an access to user, for giving an access to team use the code given below.

Principal access for team.

{
"Principal:"
{
"teamid":"",
"@@odata.type":"Microsoft.Dynamics.CRM.team"
},
"AccessMask":"ReadAccess"
}
  • Search for “Initialize variable.
  • Select “Initialize variable.”
  • Write “At” in the Name field.
  • Select “string” in the type field.
  • Write “@” in the Value field.
  • Click on “+New step.”
  • Search for “Compose.”
  • Select “Compose.”
  • Add PrincipalAccess JSON for sharing user.
  • Use the dynamic id of “At” instead of using “@.”

Hope it helps! 

Power 365ing as usual! 

Any requirements, implementation or consulting work in Power Platform or Dynamics 365 – end user, Microsoft partner or an individual? 

Problem Area – Technical, Functional, Training, Development or consulting? 

Me and my team are here to assist, please fill the following form for your business needs: Click here 

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s