# Connecting Client to ResourceServer with ManagementAPI

**URL:** <https://community.auth0.com/t/connecting-client-to-resourceserver-with-managementapi/74157>\
**Category:** Get Help\
**Tags:** management-api, auth0\
**Created:** [December 2, 2021, 9:55pm UTC](https://community.auth0.com/t/connecting-client-to-resourceserver-with-managementapi/74157 "2021-12-02T21:55:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![scampbell](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/scampbell/32/33434_2.png) [@scampbell](https://community.auth0.com/u/scampbell)\
**Post date:** [December 2, 2021, 9:55pm UTC](https://community.auth0.com/t/connecting-client-to-resourceserver-with-managementapi/74157/1 "2021-12-02T21:55:47Z")

</div>

I am attempting to automate the creation of machine to machine Clients (called Applications in the UI), and as part of this I want to grant them access to an existing ResourceServer (API within the UI). In examining the [documentation](https://auth0.com/docs/api/management/v2/#!/Resource_Servers/get_resource_servers_by_id), I can see that ResourceServer does have an object “client” that is returned when from GetResourceServer. However, when I test this and hit my ResourceServer that has multiple applications assigned to it, the client field is not returned.

Is this the avenue for linking the two entities? If so, what am I missing?

Thanks!

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 2, 2021, 11:43pm UTC](https://community.auth0.com/t/connecting-client-to-resourceserver-with-managementapi/74157/3 "2021-12-02T23:43:06Z")

</div>

Hi @scampbell,

Welcome to the Auth0 Community!

I understand that you’ve observed behavior where the Management API [Get a resource server endpoint](https://auth0.com/docs/api/management/v2/#!/Resource_Servers/get_resource_servers_by_id) does not return the `client` object.

After my tests, I found the same results. In this case, this is a bug and should return the `client` object. I will be reaching out to our Engineers to resolve this issue.

Once I have new information from our Engineers, I will relay that to you.

Thank you.

---

<div class="post-metadata">

**Author:** ![scampbell](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/scampbell/32/33434_2.png) [@scampbell](https://community.auth0.com/u/scampbell)\
**Post date:** [December 3, 2021, 1:15am UTC](https://community.auth0.com/t/connecting-client-to-resourceserver-with-managementapi/74157/4 "2021-12-03T01:15:14Z")

</div>

Thanks!

Are you able to confirm that [this](https://auth0.com/docs/api/management/v2/#!/Resource_Servers/patch_resource_servers_by_id) would be the correct way to add a new Client to an existing ResourceServer?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 14, 2021, 1:35am UTC](https://community.auth0.com/t/connecting-client-to-resourceserver-with-managementapi/74157/6 "2021-12-14T01:35:21Z")

</div>

Hi @scampbell,

Thank you for your continued patience.

I have received an update from Engineers on this issue.

It appears that the `client` object is not meant to be returned as described in the Management API v2 documentation.

Given this typo, we will be fixing the Management API v2 documentation to reflect the correct response from the Get a resource server endpoint.

If there are any further questions or concerns, please don’t hesitate to reach out.

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 29, 2021, 1:36am UTC](https://community.auth0.com/t/connecting-client-to-resourceserver-with-managementapi/74157/7 "2021-12-29T01:36:03Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
