Sub topic 8
Audiences and managing app access
This chapter assumes you can publish a workspace app (covered in the previous chapter), know the workspace roles, and understand that row-level security (RLS) is defined on the semantic model. Here you control which people see which content in an app, and how you manage that access over time.
What an audience is
An audience is a named group of people who get access to an app, plus a choice of which content items they see. One app can have several audiences. This lets you publish a single app instead of keeping a separate copy for each group.
You set up audiences on the Audiences tab of the app's setup pane. The first audience is called New audience. You can rename it and add more.
For each audience, you decide two things:
- Content: which reports, dashboards, and pages are visible. Items you hide are not visible to that audience.
- Access: which users, Microsoft 365 groups, mail-enabled security groups, or security groups can open it. You can also give access to the whole organization.
A person can belong to more than one audience. In that case they see the combined content of all their audiences.
Example: one app, three audiences
Suppose a sales app contains an executive summary, a regional detail report, and a pipeline dashboard.
| Audience | Who | Content |
|---|---|---|
| Executives | Leadership security group | All items |
| Regional managers | Managers security group | Regional detail report, pipeline dashboard |
| Sales reps | Sales security group | Pipeline dashboard |
Use groups rather than individual names. When someone joins or leaves a team, you change the group membership and leave the app alone.
Audiences do not filter data
Audiences control which items a person sees. They do not control which rows of data appear inside an item. If two audiences can both open the same report, both see the same data, unless RLS applies.
To limit rows, define an RLS role on the semantic model and assign people to it. A common table filter keeps only the rows that match the signed-in user:
[Email] = USERPRINCIPALNAME()This works on a table that has an Email column.
The two controls work together. The audience decides whether someone can open the report. RLS decides which rows appear once it is open.
Managing access after publishing
You can change audiences without touching the content itself.
- Open the workspace and select Update app.
- Go to the Audiences tab.
- Add or remove people and groups, or change the visible items.
- Select Update app to apply the changes.
Changes to who has access take effect when you update the app. Users usually see the new version the next time they open the app, though a refresh of their browser may be needed.
You can also manage access from the Manage permissions page of the app. It lists who has access and through which audience.
Common errors
- Someone sees nothing. They are not in any audience, or the group you added does not contain them. Check group membership first.
- Someone sees too much. They belong to a second audience that exposes more items, or they hold a workspace role such as Member or Contributor. Workspace roles give access to everything in the workspace, regardless of audiences.
- Users see all rows. RLS roles apply to app viewers, but they do not restrict people with edit rights on the semantic model's workspace. Test with View as before publishing.
- A new report is missing. New content is not visible to audiences until you add it to the app and update it.
Exercise
A report in your app is open to the "Sales reps" audience and to the "Executives" audience. A sales rep also belongs to the Executives group. A table filter of [Email] = USERPRINCIPALNAME() is applied through RLS. What does the rep see, and which control decides the rows?
Show answer
The rep sees the combined content of both audiences, so every item in Executives. The rows inside each item are decided by RLS, not by the audiences, so the rep sees only the rows whose Email matches their own sign-in.