Seeing 401 error when accessing log under log Analytics workspace with Admin rights

JAMS Admin Dev 0 Reputation points
2025-05-14T01:12:24.79+00:00

We have created a log analytics workspace under an Azure Storage account. When I am trying to access it with admin rights, I am seeing the following error. I am not sure why I am not able to access it even with the admin rights.

Session ID

e291e121578942a2b053fa4899aa42d6

Error code

401

Details

You do not have authorization to access this resource. /subscriptions/90a85fe1-ff52-487c-b497-3f7c1e9a590f/resourcegroups/jamsdev-devops-uscentral-rg/providers/microsoft.operationalinsights/workspaces/jamsdev-devops

User's image

Any feedback on this?

Azure Analysis Services
{count} votes

2 answers

Sort by: Most helpful
  1. Michele Ariis 2,520 Reputation points MVP
    2025-05-14T06:28:38.24+00:00

    Hi, 401 ≠ technical error, but permissions: the workspace is in “Use workspace-based access control” mode and ignores the roles on the RG/subscription.

    -In Azure Portal - Log Analytics Workspace - Access control (IAM) - Add role: assign Log Analytics Reader (consult only) or Contributor to yourself.

    -Or set the workspace to “Use resource or workspace permissions”.

    After the assignment, exit/re-enter the portal: the error disappears.


  2. phemanth 15,770 Reputation points Microsoft External Staff Moderator
    2025-05-19T03:34:44.8866667+00:00

    @JAMS Admin Dev

    It sounds like you're facing a 401 error while trying to access your Log Analytics workspace, even though you have admin rights. This can be a bit tricky because it usually relates to permissions rather than a technical issue. Here are a couple of things you might want to check:

    Workspace-Based Access Control: If your workspace is set to "Use workspace-based access control," it ignores the role assignments at the resource group or subscription level. You’ll need to assign appropriate roles directly to the workspace. You can do this by going to the Azure Portal, navigating to your Log Analytics Workspace, and then accessing "Access control (IAM)." From there, add a role for yourself, specifically either Log Analytics Reader or Log Analytics Contributor.

    Access Mode Settings: Consider changing your workspace's access control mode to "Use resource or workspace permissions." This could help resolve conflicting permission settings.

    Re-login: Sometimes, simply signing out of the Azure Portal and signing back in can refresh the permissions and solve the issue.

    If none of the above steps help resolve the error, could you provide a bit more detail by answering these questions?

    • Are there any other users experiencing the same issue with accessing the Log Analytics workspace?
    • Can you confirm the exact role assignments you have on the workspace and the resource group?
    • Have there been any recent changes to the access control settings or roles for the workspace?
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.