# Error when using the deploymentClient SDK

**URL:** <https://community.dynatrace.com/t/error-when-using-the-deploymentclient-sdk/39670>\
**Category:** Developer Q&A Forum\
**Tags:** coding-assistance, ad-hoc-functions\
**Created:** [May 10, 2023, 8:43pm UTC](https://community.dynatrace.com/t/error-when-using-the-deploymentclient-sdk/39670 "2023-05-10T20:43:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas\_c](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/thomas_c/32/17633_2.png) [@thomas\_c](https://community.dynatrace.com/u/thomas_c)\
**Post date:** [May 10, 2023, 8:43pm UTC](https://community.dynatrace.com/t/error-when-using-the-deploymentclient-sdk/39670/1 "2023-05-10T20:43:03Z")

</div>

Hi Team,

I try to use the deploymentClient SDK but get the following error from a dashboard ad-hoc function:

 ![thomas_c_0-1683751109694.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/6/1624f2adf6def4662b89c87042077edb185e095f.png)

Similar symptom as in [previous thread&nbsp;210810](https://community.dynatrace.com/topic/210810). As an admin, I expect to be able to read information from the deployment API in code tiles.

Would you know what’s the blocker in that case?

I’d like to consume that SDK in order to display the latest OneAgent version available in the tenant and quickly inform if some deployed OneAgents will become unsupported soon.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![stefan\_eggersto](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/stefan_eggersto/32/34114_2.png) [@stefan\_eggersto](https://community.dynatrace.com/u/stefan_eggersto)\
**Post date:** [May 11, 2023, 6:38am UTC](https://community.dynatrace.com/t/error-when-using-the-deploymentclient-sdk/39670/2 "2023-05-11T06:38:03Z")

</div>

Hi [@thomas\_c](https://community.dynatrace.com/user/7815)&nbsp;,

I could reproduce this issue. The code is correct, but there are two aspects that lead to this behavior:

- In the current version, the error of ad-hoc functions is not shown. This is already known and will be fixed in a next release.
- Some scopes are not requested by the Dashboards and Notebooks app, which lead to a permission error when using the `client-classic-environment-v1` SDK within these apps. I reported this to the team.

To get your code working, you need to wait until a new version of the apps is deployed.
