{"id":38419,"date":"2024-06-19T14:29:36","date_gmt":"2024-06-19T08:59:36","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=38419"},"modified":"2024-11-28T15:01:23","modified_gmt":"2024-11-28T09:31:23","slug":"exploring-access-management-using-power-automate-flows-in-dynamics-365","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2024\/06\/exploring-access-management-using-power-automate-flows-in-dynamics-365\/","title":{"rendered":"Exploring Access Management using Power Automate Flows in Dynamics 365"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignleft size-full wp-image-38421\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-in-dynamics-365.png\" alt=\"Access Management using Power Automate Flows in dynamics 365\" width=\"1400\" height=\"800\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-in-dynamics-365.png 1400w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-in-dynamics-365-300x171.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-in-dynamics-365-1024x585.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-in-dynamics-365-768x439.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-in-dynamics-365-660x377.png 660w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/><\/p>\n<p style=\"text-align: justify;\">In Dynamics, managing access to sensitive data is handled through security measures such as role-based permissions. Security roles and access management play a significant role in ensuring that the right individuals have access to the appropriate information. To grant access to particular records, users with Share permissions typically navigate to the respective record and click on the &#8220;Share&#8221; button as shown below.<\/p>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-38426\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-1.png\" alt=\"Access Management using Power Automate Flows\" width=\"1365\" height=\"643\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-1.png 1365w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-1-300x141.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-1-1024x482.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-1-768x362.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-1-660x311.png 660w\" sizes=\"(max-width: 1365px) 100vw, 1365px\" \/><\/p>\n<p style=\"text-align: justify;\">A common scenario arises when a sales manager needs to grant specific record access to a salesperson who doesn&#8217;t have the necessary permissions. The changes made by the sales manager may leave the salesperson unaware of their newly granted access, potentially leading to a loss in productivity. To resolve this issue, we can use access triggers introduced in Power Automate. These triggers activate whenever there is a change in user access for a particular record.<\/p>\n<p style=\"text-align: justify;\">To improve this process, we can automate it by sending access notifications through email messages. By setting up a Power Automate flow, we can establish a notification system that triggers whenever access is granted, modified, or revoked for a particular user regarding specific records.<\/p>\n<p style=\"text-align: justify;\">In this blog, we will utilize the example of a sales manager granting\/modifying\/revoking the permission of a salesperson in a lead record. To achieve this, we will need to create three different Power Automate flows, each of which is explained below.<\/p>\n<h2 style=\"text-align: justify;\"><strong>1. Notify the user when Access is Granted for Lead records:<\/strong><\/h2>\n<p style=\"text-align: justify;\">The <strong>GrantAccess<\/strong> action is triggered whenever full access, including Read, Write, Append, Append To, Delete, Share, and Assign permissions, is granted to the user for a specific record.<\/p>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-38427\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-2.png\" alt=\"Access Management using Power Automate Flows\" width=\"1361\" height=\"645\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-2.png 1361w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-2-300x142.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-2-1024x485.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-2-768x364.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-2-660x313.png 660w\" sizes=\"(max-width: 1361px) 100vw, 1361px\" \/><\/p>\n<p style=\"text-align: justify;\">Let\u2019s see how we can create a Power Automate flow for that:<\/p>\n<p style=\"text-align: justify;\"><strong>Step 1:<\/strong> Create a Power Automate flow and select the trigger point as \u201c<strong>When an action is performed<\/strong>\u201d. Select the <strong>Catalog<\/strong> and <strong>Category<\/strong> as <strong>All<\/strong>, and <strong>Table<\/strong> as <strong>Lead<\/strong>. Select the <strong>Action name<\/strong> as <strong>GrantAccess<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-38428 alignnone\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-3.png\" alt=\"Access Management using Power Automate Flows\" width=\"795\" height=\"509\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-3.png 795w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-3-300x192.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-3-768x492.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-3-660x423.png 660w\" sizes=\"(max-width: 795px) 100vw, 795px\" \/><\/p>\n<p style=\"text-align: justify;\">Initialize the <strong>AccessMask<\/strong> and <strong>leadID<\/strong> Variable by clicking on add action and searching for <strong>initialize variable<\/strong>. Set the value for each variable as shown below:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-38429 alignnone\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-4.png\" alt=\"Access Management using Power Automate Flows\" width=\"523\" height=\"461\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-4.png 523w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-4-300x264.png 300w\" sizes=\"(max-width: 523px) 100vw, 523px\" \/><\/p>\n<ul style=\"text-align: justify;\">\n<li><strong>AccessMask<\/strong> = triggerOutputs()?[&#8216;body\/InputParameters\/PrincipalAccess\/AccessMask&#8217;]<\/li>\n<li><strong>LeadID<\/strong> = triggerOutputs()?[&#8216;body\/InputParameters\/Target\/Id&#8217;]<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"wp-image-38430 size-full alignnone\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-5-e1718779159404.png\" alt=\"Access Management using Power Automate Flows\" width=\"560\" height=\"570\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-5-e1718779159404.png 560w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-5-e1718779159404-295x300.png 295w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 2<\/strong>: Validate the above variable values and retrieve Lead, Access Modified User, and Target User Information by using the <strong>Get a Row By ID<\/strong> action in Microsoft Dataverse connector as shown below:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-38431 alignnone\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-6.png\" alt=\"Access Management using Power Automate Flows\" width=\"525\" height=\"471\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-6.png 525w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-6-300x269.png 300w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/p>\n<ul style=\"text-align: justify;\">\n<li><strong>Lead<\/strong> = variables(&#8216;leadID&#8217;)<\/li>\n<li><strong>Access Modified User<\/strong> = triggerOutputs()?[&#8216;body\/InputParameters\/PrincipalAccess\/Principal\/Id&#8217;]<\/li>\n<li><strong>Target User Information<\/strong> = triggerOutputs()?[&#8216;body\/RunAsSystemUserId&#8217;]<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"size-full wp-image-38432 alignnone\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-7.png\" alt=\"Access Management using Power Automate Flows\" width=\"586\" height=\"581\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-7.png 586w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-7-300x297.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-7-150x150.png 150w\" sizes=\"(max-width: 586px) 100vw, 586px\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 3:<\/strong> As we have retrieved all the necessary details, we can now send an email to the user informing them that they have full access to the record, as shown below. To send the email, we are using the Outlook connector. Essentially\u00a0press\u00a0on <strong>&#8220;Include\u00a0an\u00a0activity&#8221;<\/strong> and\u00a0look\u00a0for <strong>&#8220;Send an\u00a0e-mail,&#8221;<\/strong> as\u00a0illustrated\u00a0underneath.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-38433 alignnone\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-8.png\" alt=\"Access Management using Power Automate Flows\" width=\"531\" height=\"499\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-8.png 531w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-8-300x282.png 300w\" sizes=\"(max-width: 531px) 100vw, 531px\" \/><\/p>\n<p style=\"text-align: justify;\">Now, enter the <strong>To<\/strong> as the primary email address of the target user and the <strong>Subject<\/strong> and <strong>Body<\/strong> as shown below.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-38434 alignnone\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-9.png\" alt=\"Access Management using Power Automate Flows\" width=\"617\" height=\"585\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-9.png 617w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-9-300x284.png 300w\" sizes=\"(max-width: 617px) 100vw, 617px\" \/><\/p>\n<h2 style=\"text-align: justify;\"><strong>2. Notify the user when Access is Modified for Lead records:<\/strong><\/h2>\n<p style=\"text-align: justify;\">This flow triggers whenever specific access i.e. Read, Write, etc. is granted or revoked for a particular user under specific records.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-38422\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-10.png\" alt=\"Access Management using Power Automate Flows\" width=\"1363\" height=\"643\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-10.png 1363w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-10-300x142.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-10-1024x483.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-10-768x362.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-10-660x311.png 660w\" sizes=\"(max-width: 1363px) 100vw, 1363px\" \/><\/p>\n<p style=\"text-align: justify;\">When we look at the JSON output of the trigger action from the power automate, we can see the AccessMask in JSON data, which is the addition of all access values which has been given to the user as shown below.<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-38435 alignnone\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-11.png\" alt=\"Access Management using Power Automate Flows\" width=\"499\" height=\"183\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-11.png 499w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-11-300x110.png 300w\" sizes=\"(max-width: 499px) 100vw, 499px\" \/><\/p>\n<p style=\"text-align: justify;\">Following are the access values for all permissions:<\/p>\n<ul style=\"text-align: justify;\">\n<li>Read: 1<\/li>\n<li>Write: 2<\/li>\n<li>Append: 4<\/li>\n<li>Append To: 16<\/li>\n<li>Delete: 65536<\/li>\n<li>Share: 262144<\/li>\n<li>Assign: 524288<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">Let\u2019s say if we give a user Read and Write access, the AccessMask value will be 3. To check if the user has any specific permissions, we can use a basic calculation. First, divide the AccessMask value by the permission value (either Read or Write shown above). At that point, apply the modulo operation by 2 (which is nothing but the leftover portion returned after isolating by 2). If the remainder is 1 or greater than 1, the permission is granted. If the remainder is 0, the permission is not granted.<\/p>\n<p style=\"text-align: justify;\">Imagine you have a user with Read and Write access, you would get the Access Mask as 3. Here&#8217;s how you can identify if specific permissions (Read or Write) are granted to the user.<\/p>\n<ol style=\"text-align: justify;\">\n<li>Access Mask Value: 3 (this means both Read and Write permissions are granted)<\/li>\n<li>Permission Values:\n<ul style=\"text-align: justify;\">\n<li>Read: 1<\/li>\n<li>Write: 2<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">To check if each permission is granted, follow these steps:<\/p>\n<h4 style=\"text-align: justify;\"><strong>Step-by-Step Calculation<\/strong><\/h4>\n<p style=\"text-align: justify;\"><strong>For Read Permission:<\/strong><\/p>\n<p>1. Divide the Access Mask Value by the Read Permission Value:<\/p>\n<ul style=\"text-align: justify;\">\n<li>3\u00f71=3<\/li>\n<\/ul>\n<p>2. Apply the Modulo Operation (remainder when divided by 2):<\/p>\n<ul style=\"text-align: justify;\">\n<li>3 modulo 2=1<\/li>\n<\/ul>\n<p>3. Interpret the Result:<\/p>\n<ul style=\"text-align: justify;\">\n<li>As the result is 1, the Read permission will be granted.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><strong>For Write Permission:<\/strong><\/p>\n<p>1. Divide the Access Mask Value by the Write Permission Value:<\/p>\n<ul>\n<li>3\u00f72=1.5<\/li>\n<\/ul>\n<p>2. Apply the Modulo Operation (remainder when divided by 2):<\/p>\n<ul style=\"text-align: justify;\">\n<li>5 modulo 2=1.5<\/li>\n<\/ul>\n<p>3. Interpret the Result:<\/p>\n<ul style=\"text-align: justify;\">\n<li>Since the result is greater than 1, the Write permission is granted.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">So, in this case, both Read and Write permissions are granted to the user based on the calculated values. This process helps us determine whether specific access permissions are granted or not for a given Access Mask value. Let&#8217;s implement this in the Power Automate and see how we can check if the permission is granted or not.<\/p>\n<p style=\"text-align: justify;\"><strong>Step 1<\/strong>: The triggered step and variable declaration will be the same as we have used in Step 1 of <strong>GrantAccess <\/strong>flow; the only change is that the action name will be <strong>ModifyAccess<\/strong>.<\/p>\n<p style=\"text-align: justify;\"><strong>Step 2<\/strong>: Initialize boolean variables for all access permissions and set the respective expressions as shown below:<\/p>\n<ul style=\"text-align: justify;\">\n<li>Read Permission Check Equation:<\/li>\n<\/ul>\n<p style=\"padding-left: 80px;\">IsReadPermissionGranted = if(equals(mod(div(variables(&#8216;AccessMask&#8217;), 1), 2), 1), true, false)<\/p>\n<ul style=\"text-align: justify;\">\n<li>Write Permission Check Equation:<\/li>\n<\/ul>\n<p style=\"padding-left: 80px;\">IsWritePermissionGranted = if(equals(mod(div(variables(&#8216;AccessMask&#8217;), 2), 2), 1), true, false)<\/p>\n<ul style=\"text-align: justify;\">\n<li>Append Permission Check Equation:<\/li>\n<\/ul>\n<p style=\"padding-left: 80px;\">IsAppendPermissionGranted = if(equals(mod(div(variables(&#8216;AccessMask&#8217;), 4), 2), 1), true, false)<\/p>\n<ul style=\"text-align: justify;\">\n<li>Append To Permission Check Equation:<\/li>\n<\/ul>\n<p style=\"padding-left: 80px;\">IsAppendToPermissionGranted = if(equals(mod(div(variables(&#8216;AccessMask&#8217;), 16), 2), 1), true, false)<\/p>\n<ul style=\"text-align: justify;\">\n<li>Delete Permission Check Equation:<\/li>\n<\/ul>\n<p style=\"padding-left: 80px;\">IsDeletePermissionGranted = if(equals(mod(div(variables(&#8216;AccessMask&#8217;), 65536), 2), 1), true, false)<\/p>\n<ul style=\"text-align: justify;\">\n<li>Share Permission Check Equation:<\/li>\n<\/ul>\n<p style=\"padding-left: 80px;\">IsSharePermissionGranted = if(equals(mod(div(variables(&#8216;AccessMask&#8217;), 262144), 2), 1), true, false)<\/p>\n<ul style=\"text-align: justify;\">\n<li>Assign Permission Check Equation:<\/li>\n<\/ul>\n<p style=\"padding-left: 80px;\">IsAssignPermissionGranted = if(equals(mod(div(variables(&#8216;AccessMask&#8217;), 524288), 2), 1), true, false)<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-38424 alignnone\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows12.png\" alt=\"Access Management using Power Automate Flows\" width=\"569\" height=\"535\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows12.png 569w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows12-300x282.png 300w\" sizes=\"(max-width: 569px) 100vw, 569px\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 3<\/strong>: Now we have all permission values as Boolean. We can check if the value is true, and then the access is granted; otherwise, the access is revoked as shown below:<\/p>\n<ul style=\"text-align: justify;\">\n<li>Read: @{if(variables(&#8216;IsReadPermissionGranted&#8217;), &#8216;Granted&#8217;,&#8217; Revoked&#8217;)}<\/li>\n<li>Write: @{if(variables(&#8216;IsWritePermissionGranted&#8217;), &#8216;Granted&#8217;,&#8217; Revoked&#8217;)}<\/li>\n<li>Append: @{if(variables(&#8216;IsAppendPermissionGranted&#8217;), &#8216;Granted&#8217;,&#8217; Revoked&#8217;)}<\/li>\n<li>Append To: @{if(variables(&#8216;IsAppendToPermissionGranted&#8217;), &#8216;Granted&#8217;,&#8217; Revoked&#8217;)}<\/li>\n<li>Delete: @{if(variables(&#8216;IsDeletePermissionGranted&#8217;), &#8216;Granted&#8217;,&#8217; Revoked&#8217;)}<\/li>\n<li>Share: @{if(variables(&#8216;IsSharePermissionGranted&#8217;), &#8216;Granted&#8217;,&#8217; Revoked&#8217;)}<\/li>\n<li>Assign: @{if(variables(&#8216;IsAssignPermissionGranted&#8217;), &#8216;Granted&#8217;,&#8217; Revoked&#8217;)}<\/li>\n<\/ul>\n<h2><img decoding=\"async\" class=\"size-full wp-image-38425 alignnone\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-13.png\" alt=\"Access Management using Power Automate Flows\" width=\"527\" height=\"587\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-13.png 527w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows-13-269x300.png 269w\" sizes=\"(max-width: 527px) 100vw, 527px\" \/><\/h2>\n<h2><strong>3. Notify the user when Access is Revoked for Lead records:<\/strong><\/h2>\n<p style=\"text-align: justify;\">This flow triggers whenever all access of the user has been removed from the specific record.<\/p>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-38423\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows14.png\" alt=\"Access Management using Power Automate Flows\" width=\"1363\" height=\"641\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows14.png 1363w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows14-300x141.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows14-1024x482.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows14-768x361.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows14-660x310.png 660w\" sizes=\"(max-width: 1363px) 100vw, 1363px\" \/><\/p>\n<p style=\"text-align: justify;\">The flow is almost similar to the <strong>Grant Access flow<\/strong>, apart from some modifications mentioned below:<\/p>\n<ol style=\"text-align: justify;\">\n<li>The Action name would be <strong>RevokeAccess<\/strong><\/li>\n<li>Retrieve the Target user record by providing the <strong>Table name<\/strong> as \u201cUser\u201d and <strong>Row Id<\/strong> from Trigger Outputs i.e. \u201ctriggerOutputs()? [&#8216;body\/InputParameters\/Revokee\/Id&#8217;\u201d as shown below<\/li>\n<li>The email needs to be modified as shown below<\/li>\n<\/ol>\n<h2><img decoding=\"async\" class=\"size-full wp-image-38436 alignnone\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows15.png\" alt=\"Access Management using Power Automate Flows\" width=\"587\" height=\"599\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows15.png 587w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/06\/Access-Management-using-Power-Automate-Flows15-294x300.png 294w\" sizes=\"(max-width: 587px) 100vw, 587px\" \/><\/h2>\n<h2 style=\"text-align: justify;\"><strong>Conclusion:<\/strong><\/h2>\n<p style=\"text-align: justify;\">By following the steps for creating Power Automate flows to notify users about access changes, organizations can not only improve productivity but also strengthen security measures by maintaining clear visibility and control over data access.<a href=\"https:\/\/www.inogic.com\/product\/integrations\/whatsapp-dynamics-365-crm-integration\/\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"alignleft wp-image-35882 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/08\/Want-to-Find-More-Effective-Ways-to-Chat-collaborate.gif\" alt=\"\" width=\"800\" height=\"200\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>About Sam Kumar<\/strong><\/p>\n<p>Sam Kumar is the Vice President of Marketing at Inogic, a Microsoft Gold ISV Partner renowned for its innovative apps for Dynamics 365 CRM and Power Apps. With a rich history in Dynamics 365 and Power Platform development, Sam leads a team of certified CRM developers dedicated to pioneering cutting-edge technologies with Copilot and Azure AI the latest additions. Passionate about transforming the CRM industry, Sam\u2019s insights and leadership drive Inogic\u2019s mission to change the \u201cDynamics\u201d of CRM.<\/p>\n<p>More about\u00a0<a href=\"https:\/\/www.linkedin.com\/in\/inogic\/\" target=\"_blank\" rel=\"noopener\">Sam Kumar<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Dynamics, managing access to sensitive data is handled through security measures such as role-based permissions. Security roles and access management play a significant role in ensuring that the right individuals have access to the appropriate information. To grant access to particular records, users with Share permissions typically navigate to the respective record and click\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2024\/06\/exploring-access-management-using-power-automate-flows-in-dynamics-365\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[16,1985],"tags":[1989],"class_list":["post-38419","post","type-post","status-publish","format-standard","hentry","category-dynamics-365","category-power-automate","tag-power-automate-flows"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/38419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=38419"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/38419\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=38419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=38419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=38419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}