Create and assign web roles

A web role is basically a collection of permissions to the content of your site. Before you can grant authenticated users access to restricted tables or restricted pages, you need to assign them to a web role.

Use the Portal Management app to create and assign web roles.

Create a web role

  1. Sign in to Power Pages and open your site for editing.

  2. In the left side panel, select More items () > Portal Management.

  3. In the left side panel of the Portal Management app, scroll down to Security and select Web Roles.

  4. Select New.

  5. Enter or select a Name, the Website to associate with the role, and an optional Description.

  6. Select whether authenticated or unauthenticated users should have this role by default. The default for both is No.

    • If authenticated users should have this role by default, select Yes for Authenticated Users Role. A website should have only one web role that's the default role for authenticated users.
    • If unauthenticated users should have this role by default, select Yes for Anonymous Users Role. A website should have only one web role that's the default role for unauthenticated users. The Anonymous Users Role respects only table permissions.
  7. Select Save.

Default web role for authenticated or anonymous users

If you set Authenticated Users Role to Yes, the web role is the default role for all users. This role is commonly used to provide predetermined access for users who aren't assigned any other roles. Keep in mind that users can have multiple web roles, but a site can have only one Authenticated Users web role for authenticated users.

If you set Anonymous Users Role to Yes, the web role is the default role for all users. This role is intended to be used with table permissions. It doesn't respect any other rules or permissions. A site can have only one Anonymous Users web role for unauthenticated users.

Assign users to web roles

You can assign site users to web roles from either the contact record or the web role record. However, if your site uses the enhanced data model, then assign web roles from the contact under the enhanced data model.

From the web role

  1. In the Portal Management app, select Security > Web Roles.

  2. Select a web role.

  3. Select the Related tab, and then select Contacts.

  4. Select Add Existing Contact.

  5. Search for and select the site users to assign to the web role.

  6. Select Add, and then select Save.

From the contact

  1. In the Portal Management app, select Security > Contacts.

  2. Select a contact.

  3. Select the Related tab, and then select Web Roles.

  4. Select Add Existing Web Role.

  5. Search for and select the web roles to assign to the site user.

  6. Select Add, and then select Save.

From the contact (enhanced data model)

  1. In the Power Pages Management app, select Security > Contacts.

  2. Select a contact.

  3. Select the Portal Contact (Enhanced Form)

  4. In the General tab, scroll down to the Web Roles section and select Add Existing Web Role.

    Screenshot of assigning a web role under the enhanced data model.

  5. Search for and select the web roles to assign to the site user.

  6. Select Add, and then select Save.

See also

Set table permissions
Assign table permissions
Tutorial: Display data securely on your site