{"id":2947,"date":"2018-04-10T12:50:17","date_gmt":"2018-04-10T12:50:17","guid":{"rendered":"http:\/\/himbap.com\/blog\/?p=2947"},"modified":"2018-04-10T12:50:17","modified_gmt":"2018-04-10T12:50:17","slug":"accessing-cases-of-sub-accounts-dynamics-365-portal","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=2947","title":{"rendered":"Accessing Cases of Sub Accounts- Dynamics 365 Portal"},"content":{"rendered":"<p><strong>Requirement<\/strong>: Dynamics 365 Portal user should be able to access cases from it\u2019s parent customer as well as sub account of it\u2019s parent customer.<br \/>\n<strong>Solution<\/strong>: We can implement this requirement using Web roles where we can configure entity permissions to access sub accounts and cases in dynamics 365 portal. We need two following entity permissions here:<br \/>\n1. Entity Permissions to access cases from parent customer<br \/>\n2. Entity Permissions to access cases from sub accounts of the parent.<\/p>\n<p>We are implementing these requirement in our Dynamics 365 portal trial, if you are new to portal and want to configure your trial quickly, you can refer this KB: <a href=\"https:\/\/docs.microsoft.com\/en-us\/dynamics365\/customer-engagement\/portals\/provision-portal\">https:\/\/docs.microsoft.com\/en-us\/dynamics365\/customer-engagement\/portals\/provision-portal<\/a><\/p>\n<p>You can check our earlier\u00a0article to <a href=\"https:\/\/himbap.com\/blog\/?p=2961\">create portal dev users quickly.<\/a><\/p>\n<p>By default portal contains entity permissions configured for different entity at different levels. For our first requirement we can use existing entity permissions, so let\u2019s configure our web role using following steps:<br \/>\n1. Navigate to Portal-&gt;Web Roles-&gt;New and let\u2019s say we want create web role as<strong> Portal Support User<\/strong> so enter name and keep other fields as default and click on Save.<br \/>\n2. After save click on the V button next to web role name and select entity permissions<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent2.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2948 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent2-300x155.png\" alt=\"portalparent2\" width=\"300\" height=\"155\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent2-300x155.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent2-624x322.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent2.png 636w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n3. Click on Add Existing button and search for \u201cCustomer Service- Cases where contact\u2019s account is customer\u201d and select it.<br \/>\n4. If you will open this entity permission, you will see it is configure to allow access to case entity based on account scope, so contact can see cases of it\u2019s parent account.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent3.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2949 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent3-300x208.png\" alt=\"portalparent3\" width=\"300\" height=\"208\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent3-300x208.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent3-624x432.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent3.png 736w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nLet\u2019s see this in action now, let\u2019s say we have one portal contact and we have assigned our \u201cPortal Support User\u201d web role to this contact.<br \/>\n(Click on V sign next to contact -&gt; select Web Roles-&gt; Add Existing Web Role and select \u201cPortal Support User\u201d role.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent4.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2950 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent4-300x118.png\" alt=\"portalparent4\" width=\"300\" height=\"118\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent4-300x118.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent4-1024x402.png 1024w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent4-624x245.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent4.png 1025w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nNow we can see in below screen we have one case for our customer HIMBAP where Arnav is primary contact<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent6.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2952 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent6-300x124.png\" alt=\"portalparent6\" width=\"300\" height=\"124\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent6-300x124.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent6-1024x425.png 1024w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent6-624x259.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent6.png 1119w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nNow we need to setup our entity permissions to access sub accounts.<br \/>\n5. Navigate to Portal-&gt;Security-&gt;Entity permissions-&gt;New. Let\u2019s call it \u201cAccess to Sub Account of the Parent Customer\u201d, we need to configure it like below:<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent7.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2954 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent7-300x233.png\" alt=\"portalparent7\" width=\"300\" height=\"233\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent7-300x233.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent7.png 532w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nUsing this entity permission contact will have access to sub accounts of it\u2019s parent customer. Now to access cases we need to add a child entity permissions.<br \/>\n6. Navigate to Child Entity Permission sub grid and click on + sign<br \/>\n7. Click on Lookup control and select New under lookup control<br \/>\n8. Configure entity permissions like following:<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent8.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2955 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent8-300x147.png\" alt=\"portalparent8\" width=\"300\" height=\"147\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent8-300x147.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent8-624x307.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent8.png 824w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nHere we are using Parent scope, to combine our parent and child entity permissions. Parent scope is used to access the entity which are not in a direct relationship.\u00a0Here contact is associated to\u00a0account, further account is\u00a0associated with sub accounts, whose cases we want to access.<br \/>\n<a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent9.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-full wp-image-2956 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent9.png\" alt=\"portalparent9\" width=\"158\" height=\"299\" \/><\/a><br \/>\nSo to access sub accounts cases we need to use Parent scope here. Now we need to add our \u201cAccess to Sub Accounts of the Parent Customer\u201d entity permission to existing Portal Support User web roles and when contact will access cases it will be able to see Cases from the sub accounts as well.<\/p>\n<p><a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent10.png\"><img decoding=\"async\" loading=\"lazy\" class=\" size-medium wp-image-2957 aligncenter\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent10-300x99.png\" alt=\"portalparent10\" width=\"300\" height=\"99\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent10-300x99.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent10-1024x337.png 1024w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent10-624x205.png 624w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2018\/04\/portalparent10.png 1218w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Requirement: Dynamics 365 Portal user should be able to access cases from it\u2019s parent customer as well as sub account of it\u2019s parent customer. Solution: We can implement this requirement using Web roles where we can configure entity permissions to access sub accounts and cases in dynamics 365 portal. We need two following entity permissions here: 1. Entity Permissions to&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=2947\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[402],"tags":[506,503,504,505],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2947"}],"collection":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2947"}],"version-history":[{"count":6,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2947\/revisions"}],"predecessor-version":[{"id":2972,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2947\/revisions\/2972"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}