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

**URL:** <https://community.dynatrace.com/t/app-metric-injest-request-failed-code-403-message-missing-required-permission/45530>\
**Category:** Developer Q&A Forum\
**Tags:** custom-app, data-ingest\
**Created:** [May 10, 2024, 2:18pm UTC](https://community.dynatrace.com/t/app-metric-injest-request-failed-code-403-message-missing-required-permission/45530 "2024-05-10T14:18:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brett\_schubach1](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@brett\_schubach1](https://community.dynatrace.com/u/brett_schubach1)\
**Post date:** [May 10, 2024, 2:18pm UTC](https://community.dynatrace.com/t/app-metric-injest-request-failed-code-403-message-missing-required-permission/45530/1 "2024-05-10T14:18:08Z")

</div>

Hi,

I need some help I am. I am trying to ingest a metric when I get the&nbsp;flagValue == 0. But when it gets a 0 back it says that “Missing required permission”. According to the documentation"Tip&nbsp;This operation requires the scope&nbsp;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](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** &nbsp; “app”: {&nbsp; &nbsp; “name”: “XXXXXXXX”,&nbsp; &nbsp; “version”: “3.0.0”,&nbsp; &nbsp; “description”: “A starting project with routing, fetching data, and charting”,&nbsp; &nbsp; “id”: “my.XXXXXXXX”,&nbsp; &nbsp; “scopes”: [&nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; “name”: “storage:logs:read”,&nbsp; &nbsp; &nbsp; &nbsp; “comment”: “d1efault template”&nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; “name”: “storage:buckets:read”,&nbsp; &nbsp; &nbsp; &nbsp; “comment”: “default template”&nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; “name”: “environment-api:metrics:read”,&nbsp; &nbsp; &nbsp; &nbsp; “comment”: “Read Metric”&nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; “name”: “environment-api:metrics:write”,&nbsp; &nbsp; &nbsp; &nbsp; “comment”: “Read Metric”&nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; “name”: “storage:bizevents:read”,&nbsp; &nbsp; &nbsp; &nbsp; “comment”: “Read Metric”&nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; “name”: “storage:metrics:read”,&nbsp; &nbsp; &nbsp; &nbsp; “comment”: “Read Metric”&nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; _ **{** __&nbsp; &nbsp; &nbsp; &nbsp; **“name”: “storage:metrics:write”,**__ &nbsp; &nbsp; &nbsp; &nbsp; **“comment”: “Write Metric”** __&nbsp; &nbsp; &nbsp; **},** _&nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; “name”: “storage:events:read”,&nbsp; &nbsp; &nbsp; &nbsp; “comment”: “Read Metric”&nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; “name”: “environment-api:credentials:read”,&nbsp; &nbsp; &nbsp; &nbsp; “comment”: “Read Metric”&nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; “name”: “storage:system:read”,&nbsp; &nbsp; &nbsp; &nbsp; “comment”: “Read Metric”&nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; “name”: “storage:entities:read”,&nbsp; &nbsp; &nbsp; &nbsp; “comment”: “Read Metric”&nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; “name”: “state:app-states:write”,&nbsp; &nbsp; &nbsp; &nbsp; “comment”: “State”&nbsp; &nbsp; &nbsp; },&nbsp; &nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; “name”: “state:app-states:read”,&nbsp; &nbsp; &nbsp; &nbsp; “comment”: “State”&nbsp; &nbsp; &nbsp; }&nbsp; &nbsp;]&nbsp; }}

---

<div class="post-metadata">

**Author:** ![PennyScully](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pennyscully/32/32029_2.png) [@PennyScully](https://community.dynatrace.com/u/PennyScully)\
**Post date:** [May 14, 2024, 9:20am UTC](https://community.dynatrace.com/t/app-metric-injest-request-failed-code-403-message-missing-required-permission/45530/2 "2024-05-14T09:20:34Z")

</div>

Hi&nbsp;[@brett\_schubach1](https://community.dynatrace.com/user/38550)

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&nbsp;“required permissions” that you need to write metrics. This will need to be changed in the IAM policies:&nbsp;[Manage IAM policies — Dynatrace Docs](https://docs.dynatrace.com/docs/manage/access-control/manage-user-permissions-policies/iam-policy-mgt)

You can also read more about [AppEngine Policies in this blog.](https://www.dynatrace.com/news/blog/tailored-access-management-part-2-onboard-users-to-grail-and-appengine/?_ga=2.189966509.782318418.1715584917-1215566356.1702976290&_gac=1.156313033.1715664055.CjwKCAjw9IayBhBJEiwAVuc3fhT9vM_1eCMVP2m8m6rJefCOBgDBuweWD6DGvrR587vLnbcPpzx0HBoC4VwQAvD_BwE)

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

---

<div class="post-metadata">

**Author:** ![brett\_schubach1](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@brett\_schubach1](https://community.dynatrace.com/u/brett_schubach1)\
**Post date:** [May 14, 2024, 9:24am UTC](https://community.dynatrace.com/t/app-metric-injest-request-failed-code-403-message-missing-required-permission/45530/3 "2024-05-14T09:24:25Z")

</div>

Hi [@PennyScully](https://community.dynatrace.com/user/49766)&nbsp;,

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.

---

<div class="post-metadata">

**Author:** ![brett\_schubach1](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@brett\_schubach1](https://community.dynatrace.com/u/brett_schubach1)\
**Post date:** [May 14, 2024, 9:51am UTC](https://community.dynatrace.com/t/app-metric-injest-request-failed-code-403-message-missing-required-permission/45530/4 "2024-05-14T09:51:42Z")

</div>

[@PennyScully](https://community.dynatrace.com/user/49766)&nbsp;that is what exactly was missing. After adding the rights to my user it worked 100%

---

<div class="post-metadata">

**Author:** ![PennyScully](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pennyscully/32/32029_2.png) [@PennyScully](https://community.dynatrace.com/u/PennyScully)\
**Post date:** [May 14, 2024, 10:03am UTC](https://community.dynatrace.com/t/app-metric-injest-request-failed-code-403-message-missing-required-permission/45530/5 "2024-05-14T10:03:07Z")

</div>

Fantastic! Glad it worked out 💪
