Bird
Raised Fist0
Power BIbi_tool~10 mins

Sharing and access control in Power BI - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to share a Power BI report with a user by specifying their email.

Power BI
PowerBIService.shareReport(reportId, [1])
Drag options to blanks, or click blank then click option'
AreportName
BuserEmail
CworkspaceId
DaccessLevel
Attempts:
3 left
💡 Hint
Common Mistakes
Using the report name instead of the user's email.
Using workspace ID which is unrelated to sharing with a user.
2fill in blank
medium

Complete the code to assign 'Read' access permission when sharing a dashboard.

Power BI
PowerBIService.shareDashboard(dashboardId, userEmail, [1])
Drag options to blanks, or click blank then click option'
AWrite
BDelete
CAdmin
DRead
Attempts:
3 left
💡 Hint
Common Mistakes
Assigning 'Write' permission which allows editing.
Using 'Admin' which grants full control.
3fill in blank
hard

Fix the error in the code to revoke access from a user by specifying the correct method.

Power BI
PowerBIService.[1]Access(reportId, userEmail)
Drag options to blanks, or click blank then click option'
Ashare
Bremove
Crevoke
Dgrant
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'grant' or 'share' which add permissions instead of removing.
Using 'remove' which is not the correct method name.
4fill in blank
hard

Fill both blanks to set workspace access level and add a user to the workspace.

Power BI
workspace.setAccessLevel(userEmail, [1])
workspace.[2]User(userEmail)
Drag options to blanks, or click blank then click option'
AMember
Badd
CAdmin
Dremove
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'removeUser' instead of adding.
Setting access level to 'Admin' when 'Member' is required.
5fill in blank
hard

Fill all three blanks to create a role with specific permissions and assign it to a user.

Power BI
role = new Role([1]: 'Data Analyst', [2]: ['Read', 'Export'], [3]: userEmail)
Drag options to blanks, or click blank then click option'
Aname
Bpermissions
CassignTo
Ddescription
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'description' instead of 'name' for the role.
Missing the 'assignTo' field to link the role to a user.

Practice

(1/5)
1. What is the main purpose of sharing in Power BI?
easy
A. To create new data models
B. To give others access to your reports and dashboards safely
C. To write DAX formulas
D. To export data to Excel

Solution

  1. Step 1: Understand sharing concept in Power BI

    Sharing allows you to let others see or interact with your reports and dashboards securely.
  2. Step 2: Identify the main goal of sharing

    The main goal is to provide safe access, not to create or export data.
  3. Final Answer:

    To give others access to your reports and dashboards safely -> Option B
  4. Quick Check:

    Sharing = safe access [OK]
Hint: Sharing means giving safe access to your content [OK]
Common Mistakes:
  • Confusing sharing with data modeling
  • Thinking sharing is for exporting data
  • Assuming sharing means editing data
2. Which of the following is the correct way to share a Power BI report with a colleague?
easy
A. Export the report as PDF and upload to a shared folder
B. Send the PBIX file via email without permissions
C. Copy the report URL and paste it in a public forum
D. Use the Power BI service and click the Share button on the report

Solution

  1. Step 1: Identify the official sharing method in Power BI

    The Power BI service provides a Share button to share reports securely with permissions.
  2. Step 2: Evaluate other options for security and control

    Sending files or URLs without permissions or posting publicly is unsafe and not recommended.
  3. Final Answer:

    Use the Power BI service and click the Share button on the report -> Option D
  4. Quick Check:

    Share button in service = correct sharing [OK]
Hint: Always use Share button in Power BI service for safe sharing [OK]
Common Mistakes:
  • Sharing files without permissions
  • Posting report links publicly
  • Using export instead of sharing
3. If you assign a user the 'Viewer' role in Power BI workspace, what can they do?
medium
A. Edit reports and datasets
B. Delete workspace
C. View reports and dashboards only
D. Publish new content

Solution

  1. Step 1: Understand the 'Viewer' role permissions

    The Viewer role allows users to only view reports and dashboards without editing rights.
  2. Step 2: Compare with other roles

    Editing, publishing, or deleting requires higher roles like Member or Admin.
  3. Final Answer:

    View reports and dashboards only -> Option C
  4. Quick Check:

    Viewer role = view only [OK]
Hint: Viewer role means view-only access [OK]
Common Mistakes:
  • Assuming Viewer can edit content
  • Confusing Viewer with Member or Admin roles
  • Thinking Viewer can delete workspace
4. You shared a report but the recipient says they cannot view it. What is the most likely cause?
medium
A. You forgot to assign them a role or permission
B. The report has no data
C. The recipient's Power BI license expired
D. You shared the report as a PDF

Solution

  1. Step 1: Check sharing permissions

    If the recipient cannot view, likely they were not given access or role permissions.
  2. Step 2: Evaluate other causes

    Report data or license issues are less common; sharing as PDF does not allow interactive viewing.
  3. Final Answer:

    You forgot to assign them a role or permission -> Option A
  4. Quick Check:

    Missing permission = no access [OK]
Hint: Always assign roles when sharing reports [OK]
Common Mistakes:
  • Ignoring permission assignment
  • Assuming data absence blocks viewing
  • Confusing file type with access rights
5. You want to share a dashboard with external users but restrict them from resaving or sharing it further. Which Power BI feature should you use?
hard
A. Use Azure AD B2B guest access with read-only permissions
B. Export the dashboard as Excel and email it
C. Publish the dashboard to web publicly
D. Send the PBIX file with password protection

Solution

  1. Step 1: Identify secure external sharing options

    Azure AD B2B guest access allows external users to access content with controlled permissions.
  2. Step 2: Evaluate other options for security

    Exporting or publishing publicly removes control; PBIX files cannot enforce sharing restrictions.
  3. Final Answer:

    Use Azure AD B2B guest access with read-only permissions -> Option A
  4. Quick Check:

    Azure AD B2B + read-only = secure external sharing [OK]
Hint: Use Azure AD B2B for controlled external sharing [OK]
Common Mistakes:
  • Publishing dashboards publicly
  • Sending editable files externally
  • Assuming password protects sharing rights
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard