# Getting user permission and nested teams through API

**URL:** <https://community.hubspot.com/t/getting-user-permission-and-nested-teams-through-api/78704>\
**Category:** HubSpot Ideas\
**Tags:** api\
**Created:** [April 4, 2023, 5:35pm UTC](https://community.hubspot.com/t/getting-user-permission-and-nested-teams-through-api/78704 "2023-04-04T17:35:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SCoulter](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@SCoulter](https://community.hubspot.com/u/SCoulter)\
**Post date:** [April 4, 2023, 5:35pm UTC](https://community.hubspot.com/t/getting-user-permission-and-nested-teams-through-api/78704/1 "2023-04-04T17:35:41Z")

</div>

The User Provisioning API ([Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/settings/user-provisioning)) can let us view Users, Teams, and Roles - but there is no endpoint to see the permissions associated with each role, nor can we see the association between the nested teams.

A few other articles exist on viewing the permissions [here](https://community.hubspot.com/t5/APIs-Integrations/Getting-User-Permissions-from-API/m-p/460817) and [here](https://community.hubspot.com/t5/APIs-Integrations/Getting-permissions-from-API/m-p/635266), and these have been marked “solved” with the resolution that the user should maintain the roles/permissions associations externally.

In my current scenario, we are setting up some integrated and automated means of user access reviews following POLP, the external maintenance solution is not acceptable. Any user with correct privilage could change HubSpot permissions without modifying the external reference, and there’s too much room for manual error in having someone copy over the permissions to a secondary document.

---

<div class="post-metadata">

**Author:** ![FCarneiro](https://avatars.discourse-cdn.com/v4/letter/f/b5a626/32.png) [@FCarneiro](https://community.hubspot.com/u/FCarneiro)\
**Post date:** [April 23, 2024, 8:51am UTC](https://community.hubspot.com/t/getting-user-permission-and-nested-teams-through-api/78704/2 "2024-04-23T08:51:21Z")

</div>

Hello,

Reagrading the issue you describe for the nested teams, I beleive we were confronted with a similar problem and found a workaround through process of elimintation of other fields:

Nested Teams = hs\_user\_all\_accessible\_teams - hs\_user\_secondary\_teams - hs\_user\_assigned\_primary\_team

All fields are availble on the endpoint /crm/v3/objects/users.  
However, I still do not understand which object is master with regards to the Teams information. Is it Hubspot Owner or Hubspot User.
