{"id":491,"date":"2023-02-13T14:51:00","date_gmt":"2023-02-13T14:51:00","guid":{"rendered":"https:\/\/automatethemundane.com\/index.php\/2023\/02\/13\/building-a-model-driven-app-part-6-security\/"},"modified":"2023-06-27T23:20:56","modified_gmt":"2023-06-27T23:20:56","slug":"building-a-model-driven-app-part-6-security","status":"publish","type":"post","link":"https:\/\/automatethemundane.com\/index.php\/2023\/02\/13\/building-a-model-driven-app-part-6-security\/","title":{"rendered":"Building a Model Driven App Part 6-Security"},"content":{"rendered":"\n<p class=\"has-text-color\" style=\"color:rgba(120, 119, 116, 1)\">2\/17\/2023<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">The Why<\/h1>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\"><strong>Security is of paramount importance when building an app with the Power Platform.<\/strong> To ensure that the built-in security features, such as role-based access controls and column level security, are properly implemented, it is essential to follow the security guide written during <a rel=\"noreferrer noopener\" href=\"https:\/\/automatethemundane.com\/index.php\/2023\/02\/06\/building-a-model-driven-app-part-1-design\/\" data-type=\"post\" data-id=\"390\" target=\"_blank\">part 1<\/a>.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">The How<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">Role Based Access (RBAC)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Security Roles<\/h3>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">Security roles in Power Platform Admin Center are permission sets defining user actions. Each role is a collection of permissions, and users can be assigned multiple roles. When a user is assigned a role, they have access to permissions and can take corresponding actions. Security roles are managed by Tennant and Environment System Admins.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select Security Roles\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-40.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Find the Basic User Role and select Copy\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-41.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-42.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>After the role has been copied select the role and select Edit\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-43-1024x167.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Find the customer Requests table and update the permissions \n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-44-1024x106.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-45-1024x110.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-background\" style=\"background-color:rgb(241, 241, 239)\">\ud83d\udca1 For this example I have given full CRUD to the users. Please ensure security roles align correctly<\/p>\n<\/li>\n\n\n\n<li>Navigate to the Business Process Flows Tab<\/li>\n\n\n\n<li>Ensure the BPF built in step 4 is allowed\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-46-1024x178.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Save and Close the role<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Teams<\/h3>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">Teams in the Power Platform Admin Center are groups of users with similar roles or needs. Each team is assigned security roles that determine the actions they can take. This grants granular control over access rights, ensuring users can only perform intended actions. Teams also make it easy to manage access rights, adding and removing users as needed.<\/p>\n\n\n\n<p class=\"has-background\" style=\"background-color:rgb(241, 241, 239)\">\ud83d\udca1 Note: This is not the same thing as a MS Team <\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Within the Power Platform Admin Center <\/li>\n\n\n\n<li>Select the Environment to edit and select Settings \n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-47.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-48-1024x637.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Select Teams\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-49.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Create Team\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-50-1024x313.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Connect the team to a AAD Office Group to simplify the addition or removal of users to the team.<\/li>\n\n\n\n<li>Press the Next Button to assign a security role. \n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-51.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Select the Security role that was configured above. <\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Column Level Security (CLS)<\/h2>\n\n\n\n<p class=\"has-text-color\" style=\"color:rgb(0, 0, 0)\">Column Level Security (CLS) is a feature of the Power Platform that allows users to set permissions on individual columns of a data table. With CLS enabled, users are only allowed to view, edit, or delete data from the columns they have access to. This provides an added layer of granular security to the app, ensuring that users only have access to the data they are allowed to view or modify. CLS can be set up in the Power Platform Admin Center, where admins can assign roles to the columns, granting the appropriate access rights.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>From the environment settings page select Column security profiles\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-52.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Select New<\/li>\n\n\n\n<li>Give the role a distinct name\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-53-1024x561.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Select the newly created role.<\/li>\n\n\n\n<li>A list of columns that have had security enabled will be displayed<\/li>\n\n\n\n<li>Find the column created in an earlier stage\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-54-1024x180.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>Select Edit and give it the appropriate permissions. \n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-55-1024x453.png\" alt=\"\"\/><\/figure>\n<\/li>\n\n\n\n<li>The last step will be to align the role with a team or add users directly to the role\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/06\/untitled-56-1024x100.png\" alt=\"\"\/><\/figure>\n<\/li>\n<\/ol>\n\n\n\n<h1 class=\"wp-block-heading\">Resources<\/h1>\n","protected":false},"excerpt":{"rendered":"<p>2\/17\/2023 The Why Security is of paramount importance when building an app with the Power Platform. To ensure that the built-in security features, such as role-based access controls and column level security, are properly implemented, it is essential to follow the security guide written during part 1. The How Role Based Access (RBAC) Security Roles [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":130,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,37],"tags":[4,36],"class_list":["post-491","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-model-driven-app","category-security","tag-mda","tag-security","entry","has-media"],"jetpack_featured_media_url":"https:\/\/automatethemundane.com\/wp-content\/uploads\/2023\/05\/cover-6-scaled.jpg","_links":{"self":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts\/491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/comments?post=491"}],"version-history":[{"count":1,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts\/491\/revisions"}],"predecessor-version":[{"id":495,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/posts\/491\/revisions\/495"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/media\/130"}],"wp:attachment":[{"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/media?parent=491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/categories?post=491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/automatethemundane.com\/index.php\/wp-json\/wp\/v2\/tags?post=491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}