cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
286
Views
0
Helpful
2
Replies

Webex API: List People

Martin Sloan
Level 1
Level 1

I'm trying to automate a report that gathers a list of "people" using the Webex API.  I've created a Service App and have tried to assign numerous different roles, but I'm still stuck with the /people API requiring that I pass in a param to get the information for only one user.  I've done a decent amount of homework on this and it seems to me that the only way to use the /people API in the way that I need is to use a Control Hub admin account with an access token (short lived) or OAuth (incredibly painful and truly inappropriate for automated M2M workflows like this).  Am I tracking this right or missing something that would allow a Service App to list people?  Thanks.

1 Accepted Solution

Raffaele Lagana
Cisco Employee
Cisco Employee

@Martin Sloan A service app is intended to work as an admin worker, but without needing the process of having to have an admin user authorize it through the OAuth flow (you just send it for approval in the org and the admin can then approve it in control hub). Have you added the spark-admin:people_read scope to your service app?

This should then give you access to read all people within an org that has approved the service app, by doing a GET to the webexapis.com/v1/people API (no params required).

View solution in original post

2 Replies 2

Raffaele Lagana
Cisco Employee
Cisco Employee

@Martin Sloan A service app is intended to work as an admin worker, but without needing the process of having to have an admin user authorize it through the OAuth flow (you just send it for approval in the org and the admin can then approve it in control hub). Have you added the spark-admin:people_read scope to your service app?

This should then give you access to read all people within an org that has approved the service app, by doing a GET to the webexapis.com/v1/people API (no params required).

Hi, @Raffaele Lagana.  Thanks for the assistance.  I did find a working solution for this as you mentioned.  The issue for me was with needing to regenerate the OAuth token after adjusting the scopes.  I had assigned `spark:all` and after adding `spark-admin:people_read` I did not regenerate the token, which was necessary to apply the added scope.