Welcome to the Panopto Community

Please note: All new registrants to the Panopto Community Forum must be approved by a forum moderator or admin. As such, if you navigate to a feature that is members-only, you may receive an error page if your registration has not yet been approved. We apologize for any inconvenience and are approving new members as quickly as possible.

What role does a service account need to look up other users' GUIDs via the SOAP API?

We're building an integration that grants and revokes viewer access to sessions and folders for individual users. It signs in as a dedicated service account. The grant and revoke calls in AccessManagement (GrantUsersViewerAccessToSession, GrantUsersAccessToFolder, and the Revoke equivalents) work fine once we have the target user's Panopto user ID (GUID).

The problem is getting that GUID. Our source data only gives us the person's email address (and sometimes first and last name), for example "jdoe@example.edu", whose Panopto user key is "unified\jdoe@example.edu".

What we've tried, all against PublicAPI 4.6, UserManagement service:

  • GetUserByKey for the service account itself: works
  • GetUserByKey for another user's key: refused, "The current user does not have access to call this method." (s:Client)
  • GetUsers with another user's GUID: refused, same fault
  • ListUsers (Pagination 50 / page 0, SortBy FullName): refused, same fault

The REST endpoint GET /Panopto/api/v1/users/search does work for the account (User Based Server Application client, password grant). But it returns at most 50 results with no paging, and FirstName, LastName and Email all come back null, so Username is the only field we can match on.

Questions:

  1. What system role (or other permission) does an account need to call ListUsers, GetUsers and GetUserByKey for users other than itself? Is full Administrator the only option, or is there a narrower role that allows user lookup without user-management rights such as creating or deleting users and resetting passwords?
  2. If the account is given that access, does ListUsers return populated FirstName, LastName and Email fields? If so, we think ListUsers with a searchQuery on the email address would be sufficient on its own.
  3. Does searchQuery in ListUsers match on email address, or only on username and name?
  4. Is there any setting that would make the REST users/search endpoint return the Email field for a non-admin caller?

Any guidance appreciated. Thanks!

Answers

  • Hi Linda,

    Thanks for the detailed write-up. Here are answers to your four questions.

    1. What access does the account need to look up other users?
    To call GetUserByKey or GetUsers for another user, the account needs permission to view users across the whole site. To call ListUsers, it needs permission to list users across the whole site. In Panopto’s default roles, only the Administrator role has these permissions. No narrower built-in role allows user lookup without also allowing user management. The permission group that covers viewing and listing users also covers editing user details, resetting passwords and unlocking accounts. Creating and deleting users are separate permissions.

    2. Does ListUsers return names and email when the account has that access?
    Yes. With that access, each result from ListUsers includes FirstName, LastName and Email, along with UserId and UserKey.

    3. Does searchQuery in ListUsers match on email address?
    Yes. It does a “contains” match against username, first name, last name and email address. Two things to keep in mind:

    • A search term containing a space is treated as “first name last name” and matches names only. An email address has no spaces, so it is searched normally
    • Because it is a “contains” match, searching for jdoe@example.edu could also return a user such as xjdoe@example.edu. We recommend picking the result whose Email, or whose UserKey of unified\jdoe@example.edu, matches exactly

    4. Can the REST users/search endpoint return email for a non-admin caller?
    No, and no setting changes that. The endpoint returns only Id and Username, for every caller, administrators included. It also returns a single page of up to 50 results.

    Option that doesn’t need Administrator access
    Your user keys follow the pattern unified\<email>, so the REST endpoint you already have working may be enough:

    1. Call GET /Panopto/api/v1/users/search?searchQuery=jdoe@example.edu.
    2. From the results, take the entry whose Username equals unified\jdoe@example.edu exactly. Its Id is the user ID to pass to the AccessManagement grant and revoke calls.

    A full email address is specific enough that the 50-result limit shouldn’t matter. If there is no exact match, the user doesn’t have a Panopto account yet. Typically that means they haven’t signed in through your identity provider.

    If you’d rather use ListUsers, the service account will need the Administrator role, with the user-management rights that come with it.

    I hope this helps.

    Thanks,

    -Adis

Sign In or Register to comment.