<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-automate-assigning-web-roles-and-restrict-pages-for-local-and-external-users-in-power-pages-gqiejzrbv" -->

---
title: How to Automate Assigning Web Roles and Restrict Pages...
description: This tutorial shows how to automate web role assignment in Power Pages using Power Automate instead of manual setup. It covers creating two web roles, Local...
canonical: https://daily.dev/posts/how-to-automate-assigning-web-roles-and-restrict-pages-for-local-and-external-users-in-power-pages-gqiejzrbv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Automate Assigning Web Roles and Restrict Pages for Local and External Users in Power Pages | daily.dev
og:description: This tutorial shows how to automate web role assignment in Power Pages using Power Automate instead of manual setup. It covers creating two web roles, Local...
og:url: https://daily.dev/posts/how-to-automate-assigning-web-roles-and-restrict-pages-for-local-and-external-users-in-power-pages-gqiejzrbv
og:image: https://api.daily.dev/og/posts/GQiejzRBv.png
og:image:alt: How to Automate Assigning Web Roles and Restrict Pages for Local and External Users in Power Pages
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Automate Assigning Web Roles and Restrict Pages for Local and External Users in Power Pages

**[C\# Corner](https://daily.dev/sources/csharpcorner)** · 4 min read · 0 upvotes · 0 comments

## Summary

This tutorial shows how to automate web role assignment in Power Pages using Power Automate instead of manual setup. It covers creating two web roles, Local User and Admin, and using the Authenticated Users Role setting so every logged-in user automatically gets the Local User role. Admin page access is then locked down in the design studio's Permissions tab to the Admin role only. Two Power Automate flows are built: one triggers on new Dataverse Contact rows to assign Local User, and another triggers on new External Identities rows to assign Admin to users signing in via MS Entra ID, using the Relate rows action to link the many-to-many Contact-to-Web-roles relationship.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.c-sharpcorner.com/article/how-to-automate-assigning-web-roles-and-restrict-pages-for-local-and-external-users-in-power-pages>

## Questions this post answers

### How do I automatically assign a web role to new users in Power Pages?

Set up a Power Automate flow using the Dataverse trigger 'When a row is added, modified or deleted' on the Contacts table with Change type set to Added, then use the Relate rows action to attach the Local User web role, since the Contact table has a many-to-many relationship with the Web roles table.

_Automating Power Pages role assignment comes up often on daily.dev for developers wiring Dataverse flows._

### How do I restrict a Power Pages page to only Admin users signing in with MS Entra ID?

Create an Admin web role with the Authenticated Users Role setting set to No, then in the Power Pages design studio open the page settings, go to the Permissions tab, choose 'I want to choose who can see this page', and select the Admin role. Assign that role via a Power Automate flow triggered on new rows in the External Identities table.

_Developers locking down pages by identity provider can track this kind of Power Pages setup on daily.dev._

### What does the Authenticated Users Role setting do in Power Pages web roles?

It automatically grants that web role to every user who logs in, acting like an automatic ticket dispenser at the front door. Setting it to Yes on a role like Local User gives basic access to anyone who signs in, while leaving it set to No on a role like Admin keeps that access hidden from regular users.

_Understanding default role grants matters for anyone securing Power Pages sites, a topic worth following on daily.dev._

## Similar posts on daily.dev

- [How to add External Users to an Admin Table and Display Admin-only elements in Power Pages](https://daily.dev/posts/how-to-add-external-users-to-an-admin-table-and-display-admin-only-elements-in-power-pages-3jj8eteol) · C\# Corner · 0 upvotes · 0 comments
- [How to configure password reset in Power Pages using Power Automate](https://daily.dev/posts/how-to-configure-password-reset-in-power-pages-using-power-automate-i0jarkklf) · C\# Corner · 0 upvotes · 0 comments
- [Medium](https://daily.dev/posts/medium-vgjnvyid6) · Medium · 0 upvotes · 0 comments
- [Say yes to AI context without losing control: a new way to set up and govern connectors in Atlassian Administration](https://daily.dev/posts/say-yes-to-ai-context-without-losing-control-a-new-way-to-set-up-and-govern-connectors-in-atlassian-nfxvhbt90) · Atlassian · 0 upvotes · 0 comments

---

Tags: [#authentication](https://daily.dev/tags/authentication), [#dataverse](https://daily.dev/tags/dataverse), [#power-pages](https://daily.dev/tags/power-pages)

[View this post on daily.dev](https://daily.dev/posts/how-to-automate-assigning-web-roles-and-restrict-pages-for-local-and-external-users-in-power-pages-gqiejzrbv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Automate Assigning Web Roles and Restrict Pages for Local and External Users in Power Pages","url":"https://daily.dev/posts/how-to-automate-assigning-web-roles-and-restrict-pages-for-local-and-external-users-in-power-pages-gqiejzrbv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-automate-assigning-web-roles-and-restrict-pages-for-local-and-external-users-in-power-pages-gqiejzrbv"},"datePublished":"2026-10-30T11:24:56.009Z","dateModified":"2026-10-30T11:25:46.167Z","description":"This tutorial shows how to automate web role assignment in Power Pages using Power Automate instead of manual setup. It covers creating two web roles, Local...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/86cdc0117274c0bdcbf00ad05212c288?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/86cdc0117274c0bdcbf00ad05212c288?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"C# Corner","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"C# Corner","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/ada2d584df6241748fc4e71878dc70a3","url":"https://daily.dev/sources/csharpcorner"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-automate-assigning-web-roles-and-restrict-pages-for-local-and-external-users-in-power-pages-gqiejzrbv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"authentication,dataverse,power-pages","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"C# Corner","item":"https://daily.dev/sources/csharpcorner"},{"@type":"ListItem","position":3,"name":"How to Automate Assigning Web Roles and Restrict Pages for Local and External Users in Power Pages"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-to-automate-assigning-web-roles-and-restrict-pages-for-local-and-external-users-in-power-pages-gqiejzrbv#faq","mainEntity":[{"@type":"Question","name":"How do I automatically assign a web role to new users in Power Pages?","acceptedAnswer":{"@type":"Answer","text":"Set up a Power Automate flow using the Dataverse trigger 'When a row is added, modified or deleted' on the Contacts table with Change type set to Added, then use the Relate rows action to attach the Local User web role, since the Contact table has a many-to-many relationship with the Web roles table. Automating Power Pages role assignment comes up often on daily.dev for developers wiring Dataverse flows."}},{"@type":"Question","name":"How do I restrict a Power Pages page to only Admin users signing in with MS Entra ID?","acceptedAnswer":{"@type":"Answer","text":"Create an Admin web role with the Authenticated Users Role setting set to No, then in the Power Pages design studio open the page settings, go to the Permissions tab, choose 'I want to choose who can see this page', and select the Admin role. Assign that role via a Power Automate flow triggered on new rows in the External Identities table. Developers locking down pages by identity provider can track this kind of Power Pages setup on daily.dev."}},{"@type":"Question","name":"What does the Authenticated Users Role setting do in Power Pages web roles?","acceptedAnswer":{"@type":"Answer","text":"It automatically grants that web role to every user who logs in, acting like an automatic ticket dispenser at the front door. Setting it to Yes on a role like Local User gives basic access to anyone who signs in, while leaving it set to No on a role like Admin keeps that access hidden from regular users. Understanding default role grants matters for anyone securing Power Pages sites, a topic worth following on daily.dev."}}]}
```

