<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Retrieve specific user's contacts permissions in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Retrieve-specific-user-s-contacts-permissions/m-p/1157371#M82299</link>
    <description>&lt;P&gt;Yes, that's normal. Sorry to have misled you.&lt;BR /&gt;You can only retrieve users for a contact (deal, ticket, company) with this API. Nothing else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But you can build a helper like that (my example is in Python) :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def get_user_permissions(data: dict, user_id: int) -&amp;gt; dict:
    user_perms = {}

    resources = data.get("resources", {})
    for resource_id, actions in resources.items():
        perms = []
        for action_name, info in actions.items():
            if user_id in info.get("permittedUsers", []):
                perms.append(action_name)
        if perms:
            user_perms[resource_id] = perms

    return user_perms&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way you pass the result (I took the response code from the documentation page) of your query (hcrn:999999:crm-object:0-1:123456) into the function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;user_id = 2620022
perms = get_user_permissions(hubspot_response, user_id)
print(perms)&lt;/LI-CODE&gt;&lt;P&gt;And you'll have something like that:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# {'hcrn:123456:crm-object:0-1:64151': ['crm-object:COMMUNICATE',
#                                       'crm-object:EDIT',
#                                       'crm-object:VIEW',
#                                       'crm-object:DELETE']}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 May 2025 09:06:47 GMT</pubDate>
    <dc:creator>sylvain_tirreau</dc:creator>
    <dc:date>2025-05-27T09:06:47Z</dc:date>
    <item>
      <title>Retrieve specific user's contacts permissions</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Retrieve-specific-user-s-contacts-permissions/m-p/1156902#M82285</link>
      <description>&lt;P&gt;I followed&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;https://developers.hubspot.com/docs/guides/api/settings/users/public-permissions&amp;nbsp;&amp;nbsp;documentation for&amp;nbsp;retrieving a contact's permitted user lists according to the create, delete, and update options. But I want to retrieve a contact's permissions for only one user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;I f&lt;/SPAN&gt;&lt;SPAN&gt;ollowed this&amp;nbsp;&lt;/SPAN&gt;https://developers.hubspot.com/docs/guides/api/settings/users/public-permissions&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;documentation, But I have to load all contacts for filter specific user's contacts permissions. This took too much time for me. Is there any direct solutions for&amp;nbsp;&amp;nbsp;Retrieve specific user's contacts permissions?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 05:33:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Retrieve-specific-user-s-contacts-permissions/m-p/1156902#M82285</guid>
      <dc:creator>HWimalasiri</dc:creator>
      <dc:date>2025-05-26T05:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve specific user's contacts permissions</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Retrieve-specific-user-s-contacts-permissions/m-p/1157137#M82290</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/945675"&gt;@HWimalasiri&lt;/a&gt;&lt;/SPAN&gt; and welcome, we are delighted to see you here!&lt;BR /&gt;&lt;BR /&gt;Great question, thanks for asking the HubSpot Community!&lt;BR /&gt;&lt;BR /&gt;I am glad to see that you already explored the permission endpoints for that, thanks!&lt;BR /&gt;&lt;BR /&gt;I'd love to ask our Top Experts: Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/601366"&gt;@sylvain_tirreau&lt;/a&gt;&lt;/SPAN&gt;, &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt; and &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811"&gt;@zach_threadint&lt;/a&gt;&lt;/SPAN&gt; do you have a workaround or a way to help &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/945675"&gt;@HWimalasiri&lt;/a&gt;&lt;/SPAN&gt; for a specific user, please?&lt;BR /&gt;&lt;BR /&gt;Have a lovely day and thanks so much in advance for your valuable contributions!&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
      <pubDate>Mon, 26 May 2025 15:59:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Retrieve-specific-user-s-contacts-permissions/m-p/1157137#M82290</guid>
      <dc:creator>BérangèreL</dc:creator>
      <dc:date>2025-05-26T15:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve specific user's contacts permissions</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Retrieve-specific-user-s-contacts-permissions/m-p/1157317#M82295</link>
      <description>&lt;P&gt;As the documentation you mention says, you give the id of the object you want to retrieve at the end of hcrn (resourceId).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hcrn:{accountId}:{resourceType}:{resourceTypeId}:{resourceId}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Examples with portail 999999:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to recover a contact's permissions for contact id 123456:&lt;BR /&gt;hcrn:999999:crm-object:0-1:123456&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to retrieve a user's permissions for user id 654321:&lt;BR /&gt;hcrn:999999:crm-object:0-115:654321&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2025 07:13:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Retrieve-specific-user-s-contacts-permissions/m-p/1157317#M82295</guid>
      <dc:creator>sylvain_tirreau</dc:creator>
      <dc:date>2025-05-27T07:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve specific user's contacts permissions</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Retrieve-specific-user-s-contacts-permissions/m-p/1157335#M82297</link>
      <description>&lt;P&gt;Yes &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/601366"&gt;@sylvain_tirreau&lt;/a&gt;&amp;nbsp;. I also tried that parameter you mentioned here.&lt;/P&gt;&lt;P&gt;But it shows the&amp;nbsp;&lt;SPAN&gt;"Object type id 0-115 is not supported" message to me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HWimalasiri_0-1748331581687.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/147063i515295867909039B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HWimalasiri_0-1748331581687.png" alt="HWimalasiri_0-1748331581687.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2025 07:40:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Retrieve-specific-user-s-contacts-permissions/m-p/1157335#M82297</guid>
      <dc:creator>HWimalasiri</dc:creator>
      <dc:date>2025-05-27T07:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve specific user's contacts permissions</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Retrieve-specific-user-s-contacts-permissions/m-p/1157371#M82299</link>
      <description>&lt;P&gt;Yes, that's normal. Sorry to have misled you.&lt;BR /&gt;You can only retrieve users for a contact (deal, ticket, company) with this API. Nothing else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But you can build a helper like that (my example is in Python) :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def get_user_permissions(data: dict, user_id: int) -&amp;gt; dict:
    user_perms = {}

    resources = data.get("resources", {})
    for resource_id, actions in resources.items():
        perms = []
        for action_name, info in actions.items():
            if user_id in info.get("permittedUsers", []):
                perms.append(action_name)
        if perms:
            user_perms[resource_id] = perms

    return user_perms&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way you pass the result (I took the response code from the documentation page) of your query (hcrn:999999:crm-object:0-1:123456) into the function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;user_id = 2620022
perms = get_user_permissions(hubspot_response, user_id)
print(perms)&lt;/LI-CODE&gt;&lt;P&gt;And you'll have something like that:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# {'hcrn:123456:crm-object:0-1:64151': ['crm-object:COMMUNICATE',
#                                       'crm-object:EDIT',
#                                       'crm-object:VIEW',
#                                       'crm-object:DELETE']}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 May 2025 09:06:47 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Retrieve-specific-user-s-contacts-permissions/m-p/1157371#M82299</guid>
      <dc:creator>sylvain_tirreau</dc:creator>
      <dc:date>2025-05-27T09:06:47Z</dc:date>
    </item>
  </channel>
</rss>

