Get user roles using Owner API


#1

Hello.

I just started using the HubSpot API to write an integration and I’m trying to use the Owner API to list the users in HubSpot. While using the /owners/v2/owners/ endpoint works, it returns very limited information. Is there a way of knowing if this user is an admin?


#2

@Tinadim At the moment that information is not available via the Owners API. Do you mind expanding upon what you are trying to accomplish? Maybe there is another way to get you to the same point.


#3

I’m just trying to fetch the list of users in Hubspot, and determine which ones have admin roles.


#4

@Tinadim The only to get that information at the moment is to log in to the UI.


#5

@pmanca I need this too.

How can we get this feature to be added to the API? Can it be upvoted or something?

All that is required is a permissions field to be added in the owners response for each owner, e.g:
[
{ portalId: 3254321,
ownerId: 64012301,
type: ‘PERSON’,
firstName: ‘John’,
lastName: ‘Doe’,
email: ‘johndoe@example.com’,
createdAt: 1492616230192,
updatedAt: 1492616230192,
remoteList:
[ { id: 72472612,
portalId: 3254321,
ownerId: 64012301,
remoteId: ‘8391061’,
remoteType: ‘HUBSPOT’,
active: true } ],
hasContactsAccess: false,
permissions: [‘Account administrator’, ‘Marketing administrator’, ‘Sales administrator’]
}
]


#6

@chico You can add/upvote ideas here.

http://ideas.hubspot.com/


#7

@chico Not all owners are HubSpot users so there wouldn’t necessarily be roles associated to each owner.


#8

I’ve added the idea, also added a note regarding owners who are not hubspot users.

@pmanca @Tinadim can you please upvote :slight_smile: https://community.hubspot.com/t5/HubSpot-Ideas/Getting-owner-permissions-using-Owner-API/idi-p/12667#M1550


#9

@chico As an internal HubSpot employee i’m not aloud to up-vote or post ideas that way the data can be truly the word of our customers. Thank you for posting it though!


#10

@pmanca no problem, thanks for your help!