{"id":4796,"date":"2026-09-28T13:00:21","date_gmt":"2026-09-28T13:00:21","guid":{"rendered":"https:\/\/himbap.com\/blog\/?p=4796"},"modified":"2026-09-28T13:01:03","modified_gmt":"2026-09-28T13:01:03","slug":"power-apps-canvas-app-sharing-error","status":"publish","type":"post","link":"https:\/\/himbap.com\/blog\/?p=4796","title":{"rendered":"Power Apps Canvas App Sharing Error"},"content":{"rendered":"\n<p><strong>Description<\/strong><\/p>\n\n\n\n<p>If you work with Microsoft Power Apps, Canvas Apps and Dataverse, you may sometimes see below error while trying to share a Canvas app with the users:<\/p>\n\n\n\n<p><strong>&#8220;Can&#8217;t associate security role because the security role&#8217;s Business Unit is not the same as the user&#8217;s Business unit&#8230;.&#8221;<\/strong><\/p>\n\n\n\n<p>In this article, I will explain the issue and how I fixed it!<\/p>\n\n\n\n<p><strong>Details<\/strong><\/p>\n\n\n\n<p>I recently came across an error while sharing a Canvas app with a user and I was bit confused because this was the first time I had seen it. <\/p>\n\n\n\n<p>When our Canvas App uses tables from Microsoft Dataverse, we need to configure security roles to give users access to the required data.<\/p>\n\n\n\n<p>I had already created the required security roles in my environment. My understanding was that security roles are created in the root Business Unit (BU), and the child Business Units inherit those security roles.<\/p>\n\n\n\n<p>For example, let&#8217;s say we have <strong>HIMBAP<\/strong> as our root Business Unit, with two child Business Units:<\/p>\n\n\n\n<p><strong>HIMBAP<\/strong><br>\u251c\u2500\u2500 <strong>HIMBAP Sales<\/strong><br>\u2514\u2500\u2500<strong> HIMBAP Finance<\/strong><\/p>\n\n\n\n<p>If we create a security role under the <strong>HIMBAP<\/strong> root Business Unit, the role is available to the child Business Units as well.<\/p>\n\n\n\n<p>When assigning a security role to a user, we normally work with the user&#8217;s Business Unit. For example, let&#8217;s say <strong>User 1<\/strong> belongs to the <strong>HIMBAP Sales<\/strong> child Business Unit.<\/p>\n\n\n\n<p>When we go to assign a security role to User 1, we can see the security roles available for that Business Unit and assign the required role.<\/p>\n\n\n\n<p>Based on this understanding, I was sharing my Canvas App with the user. While sharing the app, I selected the required security role, expecting Power Apps to assign the role from the user&#8217;s Business Unit. However, I received above error.<\/p>\n\n\n\n<p>The first thing I checked was whether the required security roles existed for the child Business Unit.<\/p>\n\n\n\n<p>When I cleared the checkbox\/filter that was limiting the displayed roles, I was able to see the security roles.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2026\/09\/ParentSecurityRole.png\"><img decoding=\"async\" loading=\"lazy\" width=\"867\" height=\"198\" src=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2026\/09\/ParentSecurityRole.png\" alt=\"\" class=\"wp-image-4797\" srcset=\"https:\/\/himbap.com\/blog\/wp-content\/uploads\/2026\/09\/ParentSecurityRole.png 867w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2026\/09\/ParentSecurityRole-300x69.png 300w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2026\/09\/ParentSecurityRole-768x175.png 768w, https:\/\/himbap.com\/blog\/wp-content\/uploads\/2026\/09\/ParentSecurityRole-624x143.png 624w\" sizes=\"(max-width: 867px) 100vw, 867px\" \/><\/a><\/figure>\n\n\n\n<p>I then tried to find whether anyone else had reported the same issue, but I couldn&#8217;t find anything that exactly matched my scenario.<\/p>\n\n\n\n<p>So, I decided to troubleshoot the issue by comparing different users.<\/p>\n\n\n\n<p>I found something interesting: <strong>I only received this error when sharing the app with users who were not part of the root Business Unit.<\/strong><\/p>\n\n\n\n<p>This helped me understand what was happening. When we share a Canvas App and select a Dataverse security role, Power Apps appears to use the security role associated with the <strong>root Business Unit<\/strong> during the sharing process. However, the user may belong to a child Business Unit.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How I Fixed the Issue<\/h3>\n\n\n\n<p>To resolve the issue, I first assigned the required security role to the user directly.<\/p>\n\n\n\n<p>I went to the user and assigned the required security role before sharing the Canvas App.<\/p>\n\n\n\n<p>After that, I went back to the Canvas App and shared it with the same user.<\/p>\n\n\n\n<p>This time, I was able to share the Canvas App successfully without receiving the Business Unit error.<\/p>\n\n\n\n<p><strong>Summary<\/strong><\/p>\n\n\n\n<p>Even though the security role is available in the child Business Unit, the Canvas App sharing process may not always behave as expected when the user belongs to a child Business Unit, so instead of selecting security role at the time of sharing canvas app, assign security to user before sharing.<\/p>\n\n\n\n<p>Hope it will help someone!!<br><strong>Keep learning and Keep Sharing!!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description If you work with Microsoft Power Apps, Canvas Apps and Dataverse, you may sometimes see below error while trying to share a Canvas app with the users: &#8220;Can&#8217;t associate security role because the security role&#8217;s Business Unit is not the same as the user&#8217;s Business unit&#8230;.&#8221; In this article, I will explain the issue and how I fixed it!&#8230; <a href=\"https:\/\/himbap.com\/blog\/?p=4796\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":4767,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[817,402,728],"tags":[1172,1174,1173],"_links":{"self":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4796"}],"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=4796"}],"version-history":[{"count":2,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4796\/revisions"}],"predecessor-version":[{"id":4799,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4796\/revisions\/4799"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/4767"}],"wp:attachment":[{"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himbap.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}