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.
Options

REST API User Search, Get User Details, Add Users to User Group

I'm new to the Panopto API so I'm unsure of the results that I'm getting. I'm doing a user search and my searchQuery value is an email address. The status I get back is 200, and yet, the results property comes back empty. Shouldn't I get back some user details, or is the status merely telling me that the user exists?

I also did a group search with my searchQuery value as the name of my target User Group. All I got back was the group's ID. I had hoped that it would also tell me which users were part of the group.

Using these two searches, I was attempting to determine if a user was part of a particular group. Is there a way I can do this?

Ultimately, what I need to do is add users to a User Group via the REST API or SOAP. What's the best way to achieve this goal?


User Search Results:


User Group Search Results:


Tagged:

Answers

  • Options
    Nedim DeliahmetovicNedim Deliahmetovic Panopto Employee

    Hi Alex,

    Thank you for contacting Panopto. I am Nedim and I will try to help you to achieve your goal.

    For your needs you can use our SOAP API endpoints as follows:

    GetUsers - You can search for users by userId and result will contain basic information with included groups where user is member of

    Method: POST
    Endpoint: https://Your site.panopto.com/Panopto/PublicAPI/4.0/UserManagement.svc
    Body:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <s:Body>
            <GetUsers xmlns="http://tempuri.org/">
                <auth xmlns:a="http://schemas.datacontract.org/2004/07/Panopto.Server.Services.PublicAPI.V40" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">                
                    <a:Password>Panopto admin user name</a:Password>
                    <a:UserKey>Panopto admin password</a:UserKey>
                </auth>
                <userIds xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                    <b:guid>D868928B-742b-4543-b7e4-af1100cfd6d6</b:guid>
                    <b:guid>f4121f64-bb74-4b1c-9458-af1100d0867b</b:guid>
                </userIds>
            </GetUsers>
        </s:Body>
    </s:Envelope>
    
    Headers:
    Content-Type: text/xml; charset=utf-8
    SoapAction: http://tempuri.org/IUserManagement/GetUsers
    
    Result:
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <s:Body>
            <GetUsersResponse xmlns="http://tempuri.org/">
                <GetUsersResult xmlns:a="http://schemas.datacontract.org/2004/07/Panopto.Server.Services.PublicAPI.V40" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                    <a:User>
                        <a:Email>[email protected]</a:Email>
                        <a:EmailSessionNotifications>false</a:EmailSessionNotifications>
                        <a:FirstName>Nedim</a:FirstName>
                        <a:GroupMemberships xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                            <b:guid>53470fc4-7825-4292-9638-aef3009cae02</b:guid>
                            <b:guid>755a6029-e6da-47ce-a5e1-aef3009cae07</b:guid>
                            <b:guid>4e736133-cab7-4963-b281-aef3009cae07</b:guid>
                            <b:guid>da1365bd-bf0c-406b-b973-aef3009cae08</b:guid>
                            <b:guid>33bd0ece-6fdb-4ba8-a0a8-aef3009cae08</b:guid>
                            <b:guid>0ae3b383-cfc3-427e-a56c-aef3009cae08</b:guid>
                            <b:guid>8401f5d0-4155-4e96-acee-65e7dc126fc4</b:guid>
                        </a:GroupMemberships>
                        <a:LastName>Deliahmetovic</a:LastName>
                        <a:SystemRole>Admin</a:SystemRole>
                        <a:UserBio i:nil="true"/>
                        <a:UserId>d868928b-742b-4543-b7e4-af1100cfd6d6</a:UserId>
                        <a:UserKey>msftteams\[email protected]</a:UserKey>
                        <a:UserSettingsUrl>https://nedodell.d.panopto.com/Panopto/Pages/Admin/Users/List.aspx#modalPage=UserInfo&amp;modalHeader=Nedim%20Deliahmetovic%20(msftteams%[email protected])&amp;modalParams=publicId%3dd868928b-742b-4543-b7e4-af1100cfd6d6%26isInternal%3dfalse</a:UserSettingsUrl>
                    </a:User>
                    <a:User>
                        <a:Email>[email protected]</a:Email>
                        <a:EmailSessionNotifications>false</a:EmailSessionNotifications>
                        <a:FirstName>Nedim</a:FirstName>
                        <a:GroupMemberships xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                            <b:guid>210f4adc-d3a8-4ee5-bfa1-b0530090bd74</b:guid>
                            <b:guid>8401f5d0-4155-4e96-acee-65e7dc126fc4</b:guid>
                        </a:GroupMemberships>
                        <a:LastName>Deliahmetovic</a:LastName>
                        <a:SystemRole>Admin</a:SystemRole>
                        <a:UserBio i:nil="true"/>
                        <a:UserId>f4121f64-bb74-4b1c-9458-af1100d0867b</a:UserId>
                        <a:UserKey>unified\[email protected]</a:UserKey>
                        <a:UserSettingsUrl>https://nedodell.d.panopto.com/Panopto/Pages/Admin/Users/List.aspx#modalPage=UserInfo&amp;modalHeader=Nedim%20Deliahmetovic%20(unified%[email protected])&amp;modalParams=publicId%3df4121f64-bb74-4b1c-9458-af1100d0867b%26isInternal%3dfalse</a:UserSettingsUrl>
                    </a:User>
                </GetUsersResult>
            </GetUsersResponse>
        </s:Body>
    </s:Envelope>
    

    GetUserByKey - You can get user by userKey with basic information including where user is member of

    Method: POST
    Endpoint: https://Your site.panopto.com/Panopto/PublicAPI/4.0/UserManagement.svc
    Body:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <s:Body>
            <GetUserByKey xmlns="http://tempuri.org/">
                <auth xmlns:a="http://schemas.datacontract.org/2004/07/Panopto.Server.Services.PublicAPI.V40" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">                
                    <a:Password>Panopto admin user name</a:Password>
                    <a:UserKey>Panopto admin password</a:UserKey>
                </auth>
                <userKey>msftteams\[email protected]</userKey>
            </GetUserByKey>
        </s:Body>
    </s:Envelope>
    
    Headers:
    Content-Type: text/xml; charset=utf-8
    SoapAction: http://tempuri.org/IUserManagement/GetUserByKey
    
    Result:
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <s:Body>
            <GetUserByKeyResponse xmlns="http://tempuri.org/">
                <GetUserByKeyResult xmlns:a="http://schemas.datacontract.org/2004/07/Panopto.Server.Services.PublicAPI.V40" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                    <a:Email>[email protected]</a:Email>
                    <a:EmailSessionNotifications>false</a:EmailSessionNotifications>
                    <a:FirstName>Nedim</a:FirstName>
                    <a:GroupMemberships xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                        <b:guid>53470fc4-7825-4292-9638-aef3009cae02</b:guid>
                        <b:guid>755a6029-e6da-47ce-a5e1-aef3009cae07</b:guid>
                        <b:guid>4e736133-cab7-4963-b281-aef3009cae07</b:guid>
                        <b:guid>da1365bd-bf0c-406b-b973-aef3009cae08</b:guid>
                        <b:guid>33bd0ece-6fdb-4ba8-a0a8-aef3009cae08</b:guid>
                        <b:guid>0ae3b383-cfc3-427e-a56c-aef3009cae08</b:guid>
                        <b:guid>8401f5d0-4155-4e96-acee-65e7dc126fc4</b:guid>
                    </a:GroupMemberships>
                    <a:LastName>Deliahmetovic</a:LastName>
                    <a:SystemRole>Admin</a:SystemRole>
                    <a:UserBio i:nil="true"/>
                    <a:UserId>d868928b-742b-4543-b7e4-af1100cfd6d6</a:UserId>
                    <a:UserKey>msftteams\[email protected]</a:UserKey>
                    <a:UserSettingsUrl>https://nedodell.d.panopto.com/Panopto/Pages/Admin/Users/List.aspx#modalPage=UserInfo&amp;modalHeader=Nedim%20Deliahmetovic%20(msftteams%[email protected])&amp;modalParams=publicId%3dd868928b-742b-4543-b7e4-af1100cfd6d6%26isInternal%3dfalse</a:UserSettingsUrl>
                </GetUserByKeyResult>
            </GetUserByKeyResponse>
        </s:Body>
    </s:Envelope>
    


    AddMembersToInternalGroup - You can add user to the internal or external group. This example is for internal group

    Method: POST
    Endpoint: https://Your site.panopto.com/Panopto/PublicAPI/4.0/UserManagement.svc
    Body:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <s:Body>
            <AddMembersToInternalGroup xmlns="http://tempuri.org/">
                <auth xmlns:a="http://schemas.datacontract.org/2004/07/Panopto.Server.Services.PublicAPI.V40" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">                
                    <a:Password>Panopto admin user name</a:Password>
                    <a:UserKey>Panopto admin password</a:UserKey>
                </auth>
                <groupId>210f4adc-d3a8-4ee5-bfa1-b0530090bd74</groupId>
                <memberIds xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                    <b:guid>f4121f64-bb74-4b1c-9458-af1100d0867b</b:guid>
                </memberIds>
            </AddMembersToInternalGroup>
        </s:Body>
    </s:Envelope>
    
    Headers:
    Content-Type: text/xml; charset=utf-8
    SoapAction: http://tempuri.org/IUserManagement/AddMembersToInternalGroup
    
    Result:
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <s:Body>
            <AddMembersToInternalGroupResponse xmlns="http://tempuri.org/"/>
        </s:Body>
    </s:Envelope>
    


    Documentation for other SOAP user's endpoints can be found here.

    Also, we offer public REST API and endpoints can be found here.

    I hope this will help you to achieve your goal.

    Please let us know if you have further questions.

    Regards.

  • Options

    Thank you so much, Nedim. This is exactly what I needed, the endpoints, the schemas, the required parms...and I appreciate it so much. I will follow-up with my results here.

  • Options

    Hi Nedim

    Hoping you can help. This is the response I'm getting from the REST POST when I use the GetUserByKey SOAP Action.

    This is the Service URL I'm using: https://smith.hosted.panopto.com/Panopto/PublicAPI/4.0/UserManagement.svc

    My HTTP Headers are:

    The HTTP Entity, or Request Body looks like this:

    I'm not sure what's going on here. Hoping you can shed some light on this for me. Do you think I could use a SOAP Execute rather than a REST Post? Any help you can provide would be greatly appreciated.

    Thanks, Alex

  • Options
    Nedim DeliahmetovicNedim Deliahmetovic Panopto Employee
    edited August 2023

    Hi Alex,

    Can you try with admin user and Panopto Internal provider? If you do not have already that user, you can create a new one, add administrator permissions and try again.

    Note: I noticed that Panopto Internal provider is hidden from your Identity Provider dropdown, so once you create a new one with temp pass, you will need to unhide Panopto Internal provider, sign in to your site using created user's username and password which will lead you to enter new password and you will be signed in. After that you can hide again Panopto Internal provider. With that user you should be able to get your needed response.

    Also, I am sharing with you screenshots of SOAP API request and response that I used with Postman, so you can verify that you didn't miss some step

    Body:

    Headers:

    Response:

    At the end, I am sharing with you our API support document that you can use, too: https://support.panopto.com/s/article/api-0#hTargetInstance1

    I hope this will help you.

    Please let us know if you have further questions.

    Regards.

    Nedim

  • Options

    Hi Nedim

    Per your instructions, I attempted to create an admin user Internal Provider account, but I was unsuccessful. I didn't see anything that intuitively let me choose an Internal Provider option. I was only able to create another unified user with admin privileges.

    When I logged in I did not see any dropdowns that allowed me to unhide Internal Provider.

    I tried finding documentation about this on support.panopto.com, but all I found was an article about Internal Provider consolidation.

    Could you give me some tips/tricks/instructions on how to create an admin user internal provider?

    Thanks, Alex

    p.s. thanks for your patience, support, and understanding

  • Options
    Nedim DeliahmetovicNedim Deliahmetovic Panopto Employee

    Hi Alex,

    Here are steps how to create user with internal Panopto identity provider:

    Create Admin user

    1. As a Admin user login to the Panopto site
    2. Go to System -> Users page
    3. Click on New button and create a user
    4. Add administrator role under the Access -> Site Access

    Unhide Panopto internal identity provider

    1. Go to System - Identity Providers page
    2. Edit Panopto Internal Provider and select True for "Show this in Sign-in Dropdown" setting

    Sing-in to Panopto as a created user

    1. Sing-out with current user
    2. On Login page select panopointernal identity provider from the dropdown
    3. Enter username and temp password of new created user
    4. Enter new Password and sign-in to Panopto

    Hide Internal Panopto identity provider

    1. After Sign-in go to the Identity Provider page and return back old "False" value for the "Show this in Sign-in Dropdown" setting


    I hope this steps will help you with creating Admin user for Internal Panopto identity provider.

    Regards,

    Nedim

  • Options

    On my login screen, this is all I see. There isn't an Panopto Internal Identity Provider option in the dropdown. I will check with our lead administrator to see if they can help, unless there's something you can also suggest.


  • Options
    Nedim DeliahmetovicNedim Deliahmetovic Panopto Employee
    edited August 2023

    Hi Alex,

    "Panopto" is what you need, not Panopto Internal. Sorry, my bad. Friendly description from Identity Provider page is what you will see in the dropdown.

    Nedim

  • Options

    Hey Nedim....SUCCESS! Man, that made me feel good. I was able to get the Panopto Internal Identity Provider.


    Once I got that, I updated the auth credentials in the GetUserByKey XML request. I used my own personal email address in the userKey parm for this request. I sent the request using Postman, and then I got more SUCCESS! I actually got back what I was expecting.

    The problem I have now is if I use any other value in userKey besides my own email address, I get back a blank response. For instance, instead of using [email protected], I use a different email address for someone I know exists and can see them in the UI. But when I send the request using Postman, my response comes back without any results. See below. Why is this? I need to be able to see user profiles in order to determine if they exist in a group. Does my user with Internal Identity Provider need a wider scope that admin does not provide?

    Alex

  • Options
    Nedim DeliahmetovicNedim Deliahmetovic Panopto Employee

    Hi Alex,

    I am glad that your GetUserByKey request works now!

    Your new created user that you use is Admin so you should be able to get responses from other users.

    Are you sure that you are using valid UserKey for some other user?

    You can try to use ListUsers SOAP API endpoint and to list your users. Once you do that you can verify what UserKey is related to the user that you need.

    ListUsers

    Method: POST
    Endpoint: https://Your site.panopto.com/Panopto/PublicAPI/4.0/UserManagement.svc
    Body:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <s:Body>
            <ListUsers xmlns="http://tempuri.org/">
                <auth xmlns:a="http://schemas.datacontract.org/2004/07/Panopto.Server.Services.PublicAPI.V40" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">                
                    <a:Password>*****</a:Password>
                    <a:UserKey>******</a:UserKey>
                </auth>
                <parameters>
                    <pagination xmlns:a="http://schemas.datacontract.org/2004/07/Panopto.Server.Services.PublicAPI.V40" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                        <a:pageNumber>1</a:pageNumber>
                        <a:maxNumberResults>100</a:maxNumberResults>
                    </pagination>                 
                </parameters> 
                <!-- <searchQuery>[email protected]</searchQuery> -->
            </ListUsers>
        </s:Body>
    </s:Envelope>
    
    Note: You can uncomment <!-- <searchQuery>[email protected]</searchQuery> --> to search for some specific user
    
    Headers:
    Content-Type: text/xml; charset=utf-8
    SoapAction: http://tempuri.org/IUserManagement/ListUsers
    
    Result:
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <s:Body>
            <ListUsersResponse xmlns="http://tempuri.org/">
                <ListUsersResult xmlns:a="http://schemas.datacontract.org/2004/07/Panopto.Server.Services.PublicAPI.V40" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                    <a:PagedResults>
                        <a:User>
                            <a:Email>***@panopto.com</a:Email>
                            <a:EmailSessionNotifications>true</a:EmailSessionNotifications>
                            <a:FirstName>zoom</a:FirstName>
                            <a:GroupMemberships i:nil="true" xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
                            <a:LastName>test3</a:LastName>
                            <a:SystemRole>None</a:SystemRole>
                            <a:UserBio i:nil="true"/>
                            <a:UserId>0ab88c03-2ac2-4a33-a1e0-b02600d5964d</a:UserId>
                            <a:UserKey>zoomtest3</a:UserKey>
                            <a:UserSettingsUrl>https://***.panopto.com/Panopto/Pages/Admin/Users/List.aspx#modalPage=UserInfo&amp;modalHeader=zoom%20test3%20(zoomtest3)&amp;modalParams=publicId%3d0ab88c03-2ac2-4a33-a1e0-b02600d5964d%26isInternal%3dtrue</a:UserSettingsUrl>
                        </a:User>
                        <a:User>
                            <a:Email>***@panopto.com</a:Email>
                            <a:EmailSessionNotifications>false</a:EmailSessionNotifications>
                            <a:FirstName>zoom</a:FirstName>
                            <a:GroupMemberships i:nil="true" xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
                            <a:LastName>test</a:LastName>
                            <a:SystemRole>None</a:SystemRole>
                            <a:UserBio i:nil="true"/>
                            <a:UserId>c718d70f-66aa-4525-ba91-b04900a828f9</a:UserId>
                            <a:UserKey>zoom-test-202308</a:UserKey>
                            <a:UserSettingsUrl>https://***.panopto.com/Panopto/Pages/Admin/Users/List.aspx#modalPage=UserInfo&amp;modalHeader=zoom%20test%20(zoom-test-202308)&amp;modalParams=publicId%3dc718d70f-66aa-4525-ba91-b04900a828f9%26isInternal%3dtrue</a:UserSettingsUrl>
                        </a:User>                    
                    </a:PagedResults>
                    <a:TotalResultCount>31</a:TotalResultCount>
                </ListUsersResult>
            </ListUsersResponse>
        </s:Body>
    </s:Envelope>
    

    I hope this will help you.

    Regards,

    Nedim

  • Options

    So yeah, it's very strange. I followed your suggestion and executed a ListUsers action. That was successful. I then copy and pasted one of the user email addresses that was included in the response and executed a GetUserByKey action. Even though I received a 200 response code back, there was nothing in the results. So it's the same thing that I encountered before. The only time I get actual results is when I use my own personal email address.

    Could it be something with the OAuth2 credentials and configuration I'm using and why results aren't coming back to me?

    Response Results:

    Here are my headers:

    Here's my request body:

    OAuth2 Authorization Config:


  • Options

    So I removed the OAuth2, but I still came up with the same results. I can get my user details when using my own email address as the key, but for anyone else's, I get an empty result set.

  • Options
    Nedim DeliahmetovicNedim Deliahmetovic Panopto Employee
    edited August 2023

    Hi Alex,

    Can you please share with me what user you would like to retrieve with GetUserByKey? I need at least email, first name/last name and user key.

    Also, can you share your SOAP request (Header and Body) for user you are trying to retrieve data by GetUserByKey endpoint?

    I can try on my side.

    Thanks.

    Nedim

  • Options

    Hi Nedim, I sent you the information you asked for in a message. I did not want to post names and email addresses (or anything that might be PII data) in a public place. Let me know what you think.

    Thank you, Alex

  • Options
    Nedim DeliahmetovicNedim Deliahmetovic Panopto Employee

    Hi Alex,

    Thanks for providing data. I tried and I successfully retrieved data by GetUserByKey.

    I sent you more details via message.

    I hope that will help you.

    Regards,

    Nedim

  • Options

    Nedim, thank you for the details you provided in our message. Ensuring that I prefaced the email address with "unified\" made everything work beautifully. I am also able to use the AddMembersToInternalGroup action successfully. Your assistance was instrumental toward helping me achieve success.

    Best...

Sign In or Register to comment.