# Cannot use DocumentStore service! How to authenticate my app?

**URL:** <https://community.dynatrace.com/t/cannot-use-documentstore-service-how-to-authenticate-my-app/37642>\
**Category:** Developer Q&A Forum\
**Tags:** custom-app, platform-services\
**Created:** [December 11, 2022, 6:27pm UTC](https://community.dynatrace.com/t/cannot-use-documentstore-service-how-to-authenticate-my-app/37642 "2022-12-11T18:27:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Radoslaw\_Szulgo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radoslaw_szulgo/32/1977_2.png) [@Radoslaw\_Szulgo](https://community.dynatrace.com/u/Radoslaw_Szulgo)\
**Post date:** [December 11, 2022, 6:27pm UTC](https://community.dynatrace.com/t/cannot-use-documentstore-service-how-to-authenticate-my-app/37642/1 "2022-12-11T18:27:12Z")

</div>

When I try to read or write something from the DocumentStore I get the error:

```markup
Authentication failed! Please check if the scopes you specified are valid and if the clientId is able to request all of those scopes.

```

How to solve this?

---

<div class="post-metadata">

**Author:** ![dirk\_wall](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dirk_wall/32/4849_2.png) [@dirk\_wall](https://community.dynatrace.com/u/dirk_wall)\
**Post date:** [December 12, 2022, 7:13am UTC](https://community.dynatrace.com/t/cannot-use-documentstore-service-how-to-authenticate-my-app/37642/2 "2022-12-12T07:13:55Z")

</div>

Hi Radek,

Could you please double-check if you have the necessary scopes defined in the app.config.ts&nbsp;(config → app → scopes) of your app and if your user has the right permissions? You should look out for the scopes&nbsp;document:documents:read and document:documents:write.

Cheers

---

<div class="post-metadata">

**Author:** ![Radoslaw\_Szulgo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radoslaw_szulgo/32/1977_2.png) [@Radoslaw\_Szulgo](https://community.dynatrace.com/u/Radoslaw_Szulgo)\
**Post date:** [December 12, 2022, 7:57am UTC](https://community.dynatrace.com/t/cannot-use-documentstore-service-how-to-authenticate-my-app/37642/3 "2022-12-12T07:57:48Z")

</div>

Correct! That’s how it should look like!

```auto
scopes: [{ name: "document:documents:read", comment: "default template" },
  { name: "document:documents:write", comment: "default template" },
  { name: 'document:documents:delete', comment: 'CRUD methods for Doc workflow' },
],

```
