Get the ID of a user or group via API

For some reasons, you may need to get the ID of a specific user or group and Learn365 API endpoint can help with it. This article describes what API is to be used in Swagger and what actions are to be performed.

 

To get the ID of a specific user or group, do the following:

1. Go to https://api.365.systems/ and make sure you are authorized with the relevant API key.

2. Find the Users section, expand it, find the GET method /odata/v2/Users with the Return the list of Users description and then select Try it out in the top right corner.

 

 

You can use query options parameters to control the data in the response by setting filters. When query options parameters are set, the response will contain additional data and details which you can use for search.

For example, you can use the email of the user in question to narrow the response. To do this, in the $filter field Email eq 'email address'.

 

Filter_user_request_by_email_in_api

 

3. Select Execute to run the request.

 

4. Go to the Responses block to check the results:

  • Number 2xx (for example, 200) under Code shows that the request worked correctly.
  • In the Response body field, if no query options parameters are set, you will see the list of users and groups of all the course catalogs of the tenant and their data including the ID. With query options parameters set, the response will contain only the relevant data and details.
  • You can search via Ctrl+F for the ID of a specific user or group and copy it to use wherever you need. Also, you can use the Download option to save the results of the API request in the .JSON format to your computer.
    The PrincipleType parameter in the response indicates whether this is a user or a group.

 

Get_group_ID_via_API_response_example

Example of the ID of a group.

 

Get_user_ID_via_API_response_example

Example of the ID of a user.

 

Was this article helpful?
0 out of 1 found this helpful

Comments

Article is closed for comments.