Derek Joseph Olson
Derek Joseph Olson

Reputation: 778

What LinkedIn API permission am I missing to get organization target name?

Using LinkedIn API v2.0 I'm currently trying to get a list of organisation ids and names for authenticated user that they are administrator of. I'm able to get all organisation ids using:

https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&start=0&count=100&fields=organizationalTarget&oauth2_access_token={{OAUTH_ACCESS_TOKEN}}

but when I add "organizationTarget~" as apart of fields parameter I get an error saying

"not enough permissions to access field organizationalTarget~ for GET-roleAssignee /organizationalEntityAcls"

Should I be using a different endpoint to get this data or what permission am I missing? I currently am using r_basicprofile, rw_company_admin, and rw_organization scopes while authenticating.

Upvotes: 3

Views: 3346

Answers (2)

Matteo
Matteo

Reputation: 39390

You can try with this API call:

 curl -i -X GET \
   -H "Authorization:Bearer <ACCESS-TOKEN>" \
 'https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&projection=(elements*(organizationalTarget~(localizedName)))'

Hope this help

Upvotes: 1

Steven Kuck
Steven Kuck

Reputation: 51

I found the answer on this page: https://learn.microsoft.com/en-us/linkedin/shared/references/migrations/permissions-resources-mapping

"rw_organization_admin" is the missing scope.

Upvotes: 4

Related Questions