Azure Monitor RBAC: Why Workbook Reader Role Isn't Enough to View Your Charts
Part 3 of building and locking down an Azure Monitor lab from scratch I gave a test user read-only access to a single Azure Monitor Workbook. They could open it, enter edit mode, and even change its title on screen. But
Part 3 of building and locking down an Azure Monitor lab from scratch
I gave a test user read-only access to a single Azure Monitor Workbook. They could open it, enter edit mode, and even change its title on screen. But they couldn't save the change. Worse, the charts couldn't display the Log Analytics data behind them.
I initially thought I had a Workbook permissions problem. I was actually dealing with two separate permission boundaries: access to the Workbook itself and access to the data it queries.
In this lab, I tested how Azure RBAC handles both layers, what a genuinely read-only user can and cannot do, and how reviewing Azure costs by meter helped me identify a $0.35 charge I might otherwise have overlooked.
This is Part 3 of my Azure lab series, following my VM region hunt in Part 1 and building the Log Analytics workspace, KQL query, alert, and workbook in Part 2.
The Test Plan
I started with three questions:
- Which built-in Azure roles exist for Workbooks?
- Could I create a test user in my free-trial tenant and assign a role to that user?
- Where is the exact boundary between viewing and editing under a read-only role?
As I ran the tests, I added two more:
- Would the same restrictions hold when the user switched to the Azure CLI?
- Was Workbook Reader alone enough to load the charts inside the Workbook? One rule for myself: every action had to be reversible.
1. Inspecting the built-in Workbook roles
I listed the built-in roles with the Azure CLI and filtered for βWorkbookβ. There are two:
- Workbook Reader (βCan read workbooksβ): three read actions covering Workbooks, Workbook revisions, and Workbook templates.
-
Workbook Contributor (βCan save shared workbooksβ): those same reads, plus write and delete actions for Workbooks and Workbook templates.
The Workbook Reader role doesnβt have the
Microsoft.Insights/workbooks/writepermission; the Workbook Contributor role does.
2. Creating a test user in my free-trial tenant
I created a separate Microsoft Entra ID user, lab-workbook-reader, using the az ad user create command in Cloud Shell.
Before creating the account, I needed to confirm which domain I could use for the User Principal Name (UPN). A UPN follows an email address format: a username, followed by @, and then one of the tenant's verified domains. For example, lab-workbook-reader@.
I checked the tenant's verified domains using a Microsoft Graph request through az rest. The response confirmed that my .onmicrosoft.comdomain was verified and marked as the default domain.
My first two attempts to create the user failed with the error:
The domain portion of the userPrincipalName property is invalid. You must use one of the verified domain names in your organization.
Looking back at my terminal history, I noticed that I had omitted the @ separator in both attempts. In one command, I joined the username and domain with a hyphen. In the other, I supplied the domain without the username. The domain itself was valid, but neither attempt followed the required username@domain format.
That is my interpretation of what caused the errors, since I did not test the formatting issue separately. However, when I corrected the UPN to include the@separator, the account was created successfully.
At first sign-in (in a private browser window to keep sessions separate), the test user was forced to change the password and register an authenticator app. I didnβt establish whether security defaults or another tenant policy triggered this.
3. Assigning Workbook Reader Role to one Workbook
To test access control at a specific resource level, I assigned the built-in Workbook Reader role directly to the individual Workbook, rather than assigning it at the broader resource group or subscription level.
/subscriptions/<subscription-id>/resourceGroups/rg-azure-ops-lab/providers/Microsoft.Insights/workbooks/<workbook-id>
Running az role assignment list confirmed Workbook Reader on that single Workbook, alongside my administrator accountβs Owner role inherited from the subscription.
I backed up the Workbook after assigning the role instead of before starting. Fortunately, it still served as a valid baseline. Azure stores role assignments separately from Workbook content, and the exported JSON confirmed the Workbook was last modified on October 25, before the test user existed. Next time, Iβll back up first.
4. Testing the read-only boundary in Azure Portal and CLI
Signing in as the test user in the Portal, I mapped out what the role actually permits.
Allowed:
- Finding the Workbook under Monitor > Workbooks.
- Opening it (title, text, and time-range control all rendered).
- Entering edit mode and changing the title on screen.
Blocked:
- Loading the charts (βThe provided credentials have insufficient access to perform the requested operationβ¦β).
- Saving the edit (
Microsoft.Insights/workbooks/writedenied).
Opening edit mode is not proof of write access. In my test, Azure let the user interact with the local browser editor, then enforced the missing write permission the moment they tried to save.
Testing the same account in Azure CLI
About 40 minutes after the Workbook Reader assignment, and before I added any workspace role, I opened Cloud Shell as lab-workbook-reader and ran three commands:
- Read a built-in role definition: allowed. It returned the roleβs name, type and ID.
az role definition list \
--name "Log Analytics Reader" \
--query "[].{Name:roleName,Type:roleType,ID:name}" \
-o table
-
List the workspaces in my resource group: denied. It returned
AuthorizationFailedforMicrosoft.OperationalInsights/workspaces/read.
az monitor log-analytics workspace list \
--resource-group rg-azure-ops-lab \
-o table
- Give myself Reader on the resource group: denied.
I also checked whether the test user could elevate their own permissions by assigning themselves a role. az role assignment create returned AuthorizationFailed for Microsoft.Authorization/roleAssignments/write.
az role assignment create \
--assignee "<test-user-upn>" \
--role "Reader" \
--scope "/subscriptions/<subscription-id>/resourceGroups/rg-azure-ops-lab"
That cleanly separated three layers:
- Authentication (AuthN): Who is signed in?
- Interface: Portal, CLI, PowerShell, or API.
- Authorization (AuthZ): Does this identity have permission for this action at this scope?
Cloud Shell is just an interfaceβit doesnβt bypass Azure RBAC. Being able to run a CLI command is not the same as being authorized to read or change the underlying resource.
5. Giving the user access to the underlying data
Because the Workbook queries a Log Analytics workspace, viewing the Workbook and reading its data turned out to be separate authorization checks. Before assigning a role, I inspected Log Analytics Readerβs definition with az role definition list --name "Log Analytics Reader", asking for its actions and assignable scopes. It holds four actions:
-
*/read: read access to every resource type, within whatever scope the role is assigned. -
Microsoft.OperationalInsights/workspaces/analytics/query/actionandMicrosoft.OperationalInsights/workspaces/search/action: running queries and searches against a workspace. -
Microsoft.Support/*: support actions. I didnβt look into what these allow.
So βLog Analytics Readerβ is broader than its name suggests, which is one more reason I assigned it at the workspace scope only.
A role definition simply lists what permissions a role holds; a role assignment binds that definition to a user at a specific scope. I assigned Log Analytics Reader to the same test user lab-workbook-reader at the workspace scope only, giving the account two stacked assignments:
-
lab-workbook-reader: Workbook Reader, on the individual Workbook. -
lab-workbook-reader: Log Analytics Reader, on the individual Log Analytics workspace.
A listing of the test userβs assignments confirmed both scopes:
az role assignment list --assignee "$USER_ID" --all \
--query "[].{role:roleDefinitionName, scope:scope, created:createdOn}" -o table
Role Propagation
Assigning Log Analytics Reader didnβt load the charts immediately. It took a while: the first chart appeared, the second panel kept showing an access error for a bit longer, and eventually both loaded.
I donβt know why one panel lagged behind the other. Role propagation is my guess, though one run isnβt enough to call it a rule. Once both panels had loaded, I tried saving the Workbook twice more. Save was still denied. Data access gave the user the charts, not edit rights.
6. RBAC test results at a glance
All the tests below used the same test account, lab-workbook-reader. Throughout the exercise, the account had the built-in Azure RBAC role Workbook Reader assigned at the individual Workbook level. Partway through the testing, I added the built-in Log Analytics Reader role at the law-lab workspace level. Each set of results indicates which role assignments were in place at the time of testing.
Workbook Reader only: Portal
- Find the Workbook in the gallery: Allowed.
- Open and view the Workbook: Allowed.
- Enter edit mode and change the title on screen: Allowed (browser only).
- Save the title change: Denied (
workbooks/write). - Load the charts: Denied.
Workbook Reader only: Azure CLI (Cloud Shell as the test user)
- Read built-in role definitions: Allowed.
- List Log Analytics workspaces in the resource group: Denied (
Microsoft.OperationalInsights/workspaces/read). - Self-assign Reader on the resource group: Denied (
Microsoft.Authorization/roleAssignments/write).
Workbook Reader + Log Analytics Reader: Portal
- Load both charts: Allowed (after a delay).
- Save the Workbook: Denied (
workbooks/write).
7. Removing the assignments and verifying the Workbook remained unchanged
To confirm that my testing had not modified the saved Workbook, I removed both role assignments using az role assignment delete, specifying the individual scope for each assignment.
az role assignment delete --assignee "$USER_ID" --role "Log Analytics Reader" --scope "$LAW_ID"
az role assignment delete --assignee "$USER_ID" --role "Workbook Reader" --scope "$WB_ID"
I then ran:
az role assignment list --assignee "$USER_ID" --all -o table
The command returned an empty result, confirming that no direct role assignments for the test account were returned across the current subscription and its child scopes.
I exported a fresh copy of the Workbook and compared it with my original backup using diff. The comparison returned UNCHANGED, confirming that the saved Workbook in Azure was identical to my backup.
There was one confusing moment during the earlier testing. After refreshing the Azure Portal, I was prompted to choose between two versions of the Workbook. Microsoft's documentation says autosaved edits are kept in the browser's local storage, not as Azure resources. This explained why my title change was still visible in the browser even though the save had failed. The edit never reached the Azure resource, and the diff comparison confirmed that the saved Workbook remained unchanged.
8. Lab cost
Across four weeks (October 16 to November 13), Cost Analysis recorded $0.39 on my free-trial tenant. I havenβt checked the credit balance or invoice views to see how this settled against trial credits.
- Azure Monitor: $0.35
- Virtual Machines: $0.05
- Storage: under $0.01
- Log Analytics and Network Watcher: $0.00
- Unexplained line: -$0.02 (a
RoundingAdjustmentmeter was in my cost data, so that is my guess, but I didnβt confirm it)
The surprise was the alert rule. I believed it was disabled, but the CLI showed it enabled and running every 15 minutes. Grouping Cost Analysis by meter revealed it generated the entire $0.35, billed daily from around October 22. That fits community-published pricing of roughly $0.50 per month for a 15-minute log alert, over about 22 days. The single-day spike on October 23 fits the timing of the Central India test VM from Part 1, which I deleted right after running IP flow verify tests.
9. Cleanup, in order
- Removed both role assignments from the test user.
- Deleted the test user (
az ad user showconfirmed it no longer existed). - Deleted the subscription-level diagnostic setting first, so nothing kept writing to the workspace.
- Deleted the Log Analytics workspace with the
--forceoption. Without it, Azure keeps a deleted workspace for 14 days; with it, the deletion is permanent.az monitor log-analytics workspace showthen returned βnot found.β - Deleted five resource groups, including the one Network Watcher created.
- Deleted the $10 budget.
- Removed the test user from my authenticator app.
What I learned
- Role names are summaries, not specs. Inspect the JSON definition (actions and dataActions) before assigning a role.
-
Opening the editor isnβt blocked; saving is. Workbook Reader lets users open the local browser editor, while saving enforces
Microsoft.Insights/workbooks/write. - Workbook access and data access are separate. Opening a Workbook needs a Workbook role; loading its charts needs permission on the underlying data source.
- Cloud Shell doesnβt bypass RBAC. Authentication gets you into the CLI; authorization is still evaluated per resource and scope.
- New access can take a while to appear. After adding a role, the charts didnβt load immediately and took a while to fully load. I suspect propagation, but I didnβt confirm it.
- Never trust memory on disabled resources. Inspect live state via the CLI and group Cost Analysis by meter.
- Back up before making changes, not after.
Conclusion
In Azure, read-only access rarely comes down to a single role assignment. In my test, allowing a user to open a Workbook and view the charts took two separate role assignments: Workbook Reader on the Workbook itself and Log Analytics Reader on the underlying workspace. This lab showed me why least-privilege access requires understanding where Azure enforces permissions, both at the resource level and at the data source.
With the Workbook backed up, both role assignments removed, and the lab resources cleaned up, my three-part Azure Monitor series comes to a close.
Next, I'll be starting a fresh lab to deploy a simple application on Azure Kubernetes Service (AKS).
Connect with me:
LinkedIn: linkedin.com/in/gloriaboakye
Medium: medium.com/@gloriaboakye
GitHub: github.com/gloriaboakye
Tags: Azure, Cloud Computing, DevOps, Cloud Security, Microsoft Azure
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.












