🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Technology & Design › Data Science & Analytics › Dashboards: Design, Build, and Deploy with Power BI and Tableau › Lesson 6
TEC-DATA85-07 · Lesson 6 · 12 clock hours · lab

Publishing, Sharing, and Row-Level Security in Power BI Service

Objective. Students publish a Power BI report to a Power BI Service workspace, configure a scheduled data refresh, share the report with a guest user, and implement row-level security (RLS) restricting two user roles to distinct data subsets.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

Publishing a Report from Power BI Desktop to the Service

Power BI Desktop is where you build your report; Power BI Service (app.powerbi.com) is where you share it with the world. Publishing moves your `.pbix` file to a workspace in the Service. A workspace is a collaborative container—think of it as a shared project folder that holds datasets, reports, and dashboards together.

To publish, open your finished report in Power BI Desktop, select Home → Publish, and choose the target workspace. Power BI uploads both the dataset and the report in a single step. Once published, the dataset and report appear as separate items in the workspace. Treat them as separate objects: you can build multiple reports on top of one dataset, and you can refresh the dataset on its own schedule.

Scheduled Data Refresh

A published dataset can refresh automatically so that your report always shows current data. The data source determines how refresh works:

For an Import-mode dataset connected to a PostgreSQL database sitting on your organization's network, you need an on-premises data gateway. The gateway is a lightweight Windows service installed on a machine that can reach both the database and the internet. It acts as a secure bridge, relaying queries and data between Power BI Service and your on-premises source. The gateway must be running and healthy for scheduled refresh to succeed.

To configure a schedule: open the dataset's settings in the Service, expand Scheduled refresh, toggle it on, choose a frequency (up to eight times per day on a shared capacity, more on Premium), and set the time zone. You can also click Refresh now to trigger a manual refresh and check the result immediately in Refresh history, which shows each run's start time, duration, and status—Succeeded or Failed.

Safety note: Refresh credentials are stored in the Service and encrypted at rest. Never store database passwords in plain text inside a `.pbix` file or in source control. Use the Service's credential manager to enter and update connection credentials securely.

Row-Level Security (RLS)

Row-level security restricts which rows a given user can see in a dataset. RLS is defined in Power BI Desktop using DAX filter expressions applied to a table, then enforced in the Service based on role membership.

Creating RLS Roles in Desktop

Go to Modeling → Manage roles → Create. Name your role (for example, `Region_East`). Select the table that contains the column you want to filter—say a `Sales` table with a `Region` column—and enter a DAX filter expression:

```

[Region] = "East"

```

Create a second role, `Region_West`, with:

```

[Region] = "West"

```

Use Modeling → View as to test each role without leaving Desktop. The canvas re-renders showing only the rows that pass the filter. Verify the row counts match expected values before publishing.

Assigning Roles in the Service

After publishing, open the dataset in the workspace, select More options (…) → Security. Add each test email address to the appropriate role. Users assigned to `Region_East` will only ever see East rows, regardless of which report or visual they use. Use View as role inside the Security panel to do a final verification in the Service.

Security note: RLS is enforced at the dataset layer, not the report layer. Sharing a report does not bypass RLS. However, a user with Build permission on the dataset can create their own report and may be able to explore data in ways you did not design; grant Build permission only when it is intentional.

Sharing Reports and Managing Permissions

Sharing a report gives a specific person access to view it without giving them full workspace membership. From the report, select Share, enter the recipient's Microsoft 365 email, choose whether to allow resharing, and set the permission level. For most external viewers, View is appropriate.

The recipient receives an email link. When they open it they see the report but cannot access the Edit mode, cannot modify visuals, and cannot export the underlying data unless you explicitly enable that option.

To revoke access, return to the report's Share panel, find the recipient in the list, and remove them. Their existing link becomes invalid immediately—the next time they try to open it they will see an access-denied message.

Guest users (people outside your Microsoft 365 tenant) require Azure Active Directory B2B guest accounts. Your instructor will provision these test accounts for the lab. Never use real production accounts or real customer email addresses in a lab environment.

PL-300 Relevance

This lesson maps directly to the Deploy and maintain assets domain of the Microsoft PL-300 exam. Expect exam questions on gateway configuration, refresh scheduling limits, RLS DAX syntax, and the difference between workspace roles (Admin, Member, Contributor, Viewer) and dataset-level security roles. Understanding what each permission level can and cannot do is as important as knowing how to configure it.

Key terms9

Power BI ServiceThe cloud-based platform at app.powerbi.com where published Power BI reports and datasets are hosted, shared, and managed.
WorkspaceA collaborative container in Power BI Service that holds related datasets, reports, and dashboards and controls who can access or edit them.
On-premises data gatewayA Windows service installed on a local machine that creates a secure bridge between Power BI Service and data sources that are not directly accessible on the internet, such as an internal PostgreSQL database.
Scheduled refreshAn automated process configured in Power BI Service that re-imports data from a source on a defined schedule, keeping an Import-mode dataset current.
Row-level security (RLS)A feature that uses DAX filter expressions assigned to named roles to restrict which rows of data a given user can see in a dataset, enforced at the dataset layer regardless of the report.
DAX filter expressionA Data Analysis Expressions formula applied to a table column within an RLS role definition that evaluates to TRUE or FALSE to determine which rows are visible.
Import modeA Power BI data connectivity mode in which a snapshot of the source data is loaded into Power BI's in-memory engine; the snapshot must be refreshed to reflect source changes.
View as roleA testing feature in both Power BI Desktop and Power BI Service that renders the report as if the current user were a member of a selected RLS role, used to verify correct row filtering.
Refresh historyA log in Power BI Service dataset settings that records the start time, duration, and outcome (Succeeded or Failed) of every scheduled or manual refresh attempt.
In class: Publish and schedule lab: students publish their report from Power BI Desktop to the class workspace, configure a daily scheduled refresh against the class PostgreSQL gateway, and screenshot the refresh history after a manual trigger. · RLS configuration: students create two DAX-based RLS roles (e.g., 'Region_East' and 'Region_West') in Power BI Desktop, publish, assign each role to a test email address in the Service, and use the 'View as role' feature to verify each role sees only the correct rows. · Sharing and permissions review: students share the published report with a partner's Microsoft 365 account at 'view only' permission, have the partner open it and confirm they cannot edit, then revoke access and confirm the partner can no longer open the link.
Materials: Power BI Service (free or Pro trial account), Microsoft 365 test accounts (instructor-provisioned), class PostgreSQL instance with on-premises data gateway or import-mode dataset, Power BI Service documentation
Check: Instructor verifies scheduled refresh shows 'Succeeded' in refresh history; both RLS roles return correct filtered row counts verified against SQL query answer key; partner confirms share/revoke cycle worked. PL-300 mapping: Deploy and maintain assets domain.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

Deploy and maintain assets
1. A student publishes a report from Power BI Desktop to Power BI Service. Which two objects appear separately in the workspace after a successful publish?
Deploy and maintain assets
2. A class dataset uses Import mode and connects to a PostgreSQL server on the school's private network. What must be installed and running for scheduled refresh to succeed?
Deploy and maintain assets
3. A student checks the dataset's Refresh history and sees the status 'Failed' for the last three runs. Which Power BI Service location should they check first to diagnose a credential problem?
Deploy and maintain assets
4. A student creates an RLS role called Region_East with the DAX filter expression [Region] = "East" applied to the Sales table. What is the correct behavior when a user assigned to Region_East opens a report?
Deploy and maintain assets
5. After publishing, where in Power BI Service does an administrator assign a user's email address to an RLS role?
Deploy and maintain assets
6. A partner has been shared a Power BI report at View permission. Which action can the partner perform?
Deploy and maintain assets
7. A user holds Build permission on a dataset but has not been granted membership in any workspace. What is the primary security risk this creates?
Deploy and maintain assets
8. A student wants to verify that the Region_West RLS role returns only West rows before assigning real users. Which feature should they use inside Power BI Desktop?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.