Skip to content

OAuth scope for user events missing #215

@MrManny

Description

@MrManny

Describe the bug
When attempting to query user.events, the execute_dql tool fails.

The exact error message returned by the tool call (slightly redacted):

Client Request Error: NOT_AUTHORIZED_FOR_TABLE. exceptionType: "DQL-AUTHORIZATION". errorType: "NOT_AUTHORIZED_FOR_TABLE". errorMessage: "Insufficient permission to access table (user.events).". arguments: ["user.events"]. queryString: "fetch user.events\n| (etc.)". errorMessageFormatSpecifierTypes: ["GENERAL_MESSAGE"]. errorMessageFormat: "Insufficient permission to access table (%1$s).". queryId: "1d65c721-7761-4d2e-9de1-b6c1ac316675" with HTTP status: 403. Note: Your user or service-user is most likely lacking the necessary permissions/scopes for this API Call. (body: {"error":{"message":"NOT_AUTHORIZED_FOR_TABLE","details":{"exceptionType":"DQL-AUTHORIZATION","errorType":"NOT_AUTHORIZED_FOR_TABLE","errorMessage":"Insufficient permission to access table (user.events).","arguments":["user.events"],"queryString":"fetch user.events\n| (etc.)","errorMessageFormatSpecifierTypes":["GENERAL_MESSAGE"],"errorMessageFormat":"Insufficient permission to access table (%1$s).","queryId":"1d65c721-7761-4d2e-9de1-b6c1ac316675"},"code":403}})

To Reproduce
Steps to reproduce the behavior:

  1. Use Local MCP with automagic OAuth
  2. Write a query that accesses user.events via execute_dql
  3. See error

Expected behavior
User events can be accessed.

Screenshots
If applicable, add screenshots to help explain your problem.

Image

Desktop (please complete the following information):

  • OS: Windows 11 Enterprise
  • IDE: VS Code 1.105.1
  • MCP: latest at the time, probably 0.9.2

Additional context
Scope storage:user.events:read likely missing here:

dynatrace-mcp/src/index.ts

Lines 78 to 108 in 1d86f16

const allRequiredScopes = scopesBase.concat([
// Storage (Grail) scopes
'storage:events:read', // Read events from Grail
'storage:buckets:read', // Read all system data stored on Grail
'storage:security.events:read', // Read Security events from Grail
'storage:entities:read', // Read classic Entities
'storage:smartscape:read', // Read Smartscape Entities from Grail
'storage:logs:read', // Read logs for reliability guardian validations
'storage:metrics:read', // Read metrics for reliability guardian validations
'storage:bizevents:read', // Read bizevents for reliability guardian validations
'storage:spans:read', // Read spans from Grail
'storage:system:read', // Read System Data from Grail
// Settings and configuration scopes
'app-settings:objects:read', // Read app settings objects
'settings:objects:read', // Read settings objects
'environment-api:entities:read', // Read entities via environment API
// Davis CoPilot scopes
'davis-copilot:nl2dql:execute', // Convert natural language to DQL
'davis-copilot:dql2nl:execute', // Convert DQL to natural language
'davis-copilot:conversations:execute', // Chat with Davis CoPilot
// Automation/Workflows scopes
'automation:workflows:write', // Create and modify workflows
'automation:workflows:read', // Read workflows
'automation:workflows:run', // Execute workflows
// Communication scopes
'email:emails:send', // Send emails
]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions