cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

App Metric injest - Request failed: {"code":403,"message":"Missing required permission."}

Hi, 

 

I need some help I am. I am trying to ingest a metric when I get the flagValue == 0. But when it gets a 0 back it says that "Missing required permission". According to the documentation"Tip This operation requires the scope storage:metrics:write. " which I have added below. I have restart multiple times and still no success

Logfile 

2024-05-10T16:09:23.003Z DEBUG [AUTH] Using SSO-URL 'https://sso.dynatrace.com'
2024-05-10T16:09:23.172Z ERROR Request failed: {"code":403,"message":"Missing required permission."}
2024-05-10T16:09:23.231Z ERROR Request failed: {"code":403,"message":"Missing required permission."}
2024-05-10T16:09:23.797Z DEBUG [TELEMETRY] Successfully closed OpenKit connection

app.config.json
  "app": {
    "name": "XXXXXXXX",
    "version": "3.0.0",
    "description": "A starting project with routing, fetching data, and charting",
    "id": "my.XXXXXXXX",
    "scopes": [
      {
        "name": "storage:logs:read",
        "comment": "d1efault template"
      },
      {
        "name": "storage:buckets:read",
        "comment": "default template"
      },
      {
        "name": "environment-api:metrics:read",
        "comment": "Read Metric"
      },
      {
        "name": "environment-api:metrics:write",
        "comment": "Read Metric"
      },
     
      {
        "name": "storage:bizevents:read",
        "comment": "Read Metric"
      },
      {
        "name": "storage:metrics:read",
        "comment": "Read Metric"
      },
      {
        "name": "storage:metrics:write",
        "comment": "Write Metric"
      },
      {
        "name": "storage:events:read",
        "comment": "Read Metric"
      },
      {
        "name": "environment-api:credentials:read",
        "comment": "Read Metric"
      },
      {
        "name": "storage:system:read",
        "comment": "Read Metric"
      },
      {
        "name": "storage:entities:read",
        "comment": "Read Metric"
      },
      {
        "name": "state:app-states:write",
        "comment": "State"
      },
      {
        "name": "state:app-states:read",
        "comment": "State"
      }
    ]
  }
}
 
4 REPLIES 4

PennyScully
Dynatrace Guide
Dynatrace Guide

Hi @brett_schubach1 

From reviewing your question, I can see you've correctly edited your scopes as highlighted in the documentation. However, what may be causing the issue is that you might not have the correct the "required permissions" that you need to write metrics. This will need to be changed in the IAM policies: https://docs.dynatrace.com/docs/manage/access-control/manage-user-permissions-policies/iam-policy-mg... 

You can also read more about AppEngine Policies in this blog. 

If your not able to do this you may need to contact your Dynatrace Admin to help you set this up. Hope this helps. Thanks, Penny

Hi @PennyScully ,

Thank you, I think that is the issue. I am an Admin so will check and if required add the correct rights and let you know. 

Appreciate the assistance. 

@PennyScully that is what exactly was missing. After adding the rights to my user it worked 100%

Fantastic! Glad it worked out 💪

 

Featured Posts