JumpCloud, like many other directories, gives each object a specific or unique identifier. These objectIDs are associated with almost every item that is configurable within the platform. You may need these objectIDs if you’re troubleshooting an issue, writing custom scripts, calling the API, or integrating third party apps with the JumpCloud Platform.
In this article we’ll cover the most common Object IDs and how to get them through the API and JumpCloud PowerShell Module.
You can also use the Admin Portal GUI to retrieve objectIDs. See Retrieve Object IDs from the Admin Portal.
Prerequisites:
- To perform any of the following steps you’ll need your API Key. To gather your API key, see JumpCloud APIs – Accessing your API Key.
- To perform steps using the JumpCloud PowerShell Module, you’ll have to install it on your device. To download and install the JumpCloud PowerShell Module, see Install the JumpCloud PowerShell Module.
Retrieving ObjectIDs from the API or PowerShell Module
This section covers how to locate the ObjectIDs of the most common JumpCloud objects such as Users, User Groups, Devices, Device Groups, Policies, ApplicationIDs, and more through the API and the JumpCloud PowerShell Module.
Locating the User’s UserID
via cURL to API (Username)
curl -X GET https://console.jumpcloud.com/api/systemusers?fields=id&filter=username:$eq:ENTER_USERNAME_HERE' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: API_KEY_GOES_HERE' \
This will print out the user’s id within JumpCloud. Ensure to replace ENTER_USERNAME_HERE with the target user’s username and replace API_KEY_GOES_HERE with your JumpCloud Admin API Key.
Example Output
{"totalCount":1,"results":[{"id":"XXXXXXXXXXXXXXXXXabc123","_id":"XXXXXXXXXXXXXXXXXabc123"}]}
via cURL to API (User’s Email Address)
curl --location 'https://console.jumpcloud.com/api/search/systemusers?fields=&filter=%3Cstring%3E&limit=10&skip=0' \
--header 'x-org-id: YOUR_ORG_ID' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '{"searchFilter" : {"searchTerm": "USER-EMAIL","fields": ["email"]},"fields" : "email"}'
This lets you retrieve the user id by searching for an email address. Ensure to replace the values: YOUR_ORG_ID, YOUR_API_KEY, and USER-EMAIL.
Example Output
{"totalCount": 1, "results":
[{"id": "5e23**************567", "email": "[email protected]"}]}
via PowerShell Module
Get-JCUser ENTER_USERNAME_HERE | Select-Object id
Example Output
id
--
XXXXXXXXXXXXXXXXXabc123
Locating the Device’s SystemID
In JumpCloud, devices may also be called systems. In the Admin Portal, the device’s unique identifier is called the SystemId. In the API, the SystemId is refereed to as just _id or id. The SystemId is also found within the Agent configuration file on the targeted device as well.
via cURL to API
curl -X GET https://console.jumpcloud.com/api/systems?fields=id&filter=hostname:$eq:ENTER_HOSTNAME_HERE' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: API_KEY_GOES_HERE' \
This will print out the device’s id within JumpCloud. Ensure you replace ENTER_HOSTNAME_HERE with the target device’s hostname, and replace API_KEY_GOES_HERE with your JumpCloud Admin API Key. You can find the Hostname of the Device in the Admin Portal within the Details panel of the selected Device.
Example Output
{"totalCount":1,"results":[{"id":"XXXXXXXXXXXXXXXXXaaa098","_id":"XXXXXXXXXXXXXXXXXaaa098"}]}
via PowerShell Module
Get-JCSystem -hostname ENTER_HOSTNAME_HERE | Select-Object id
Example Output
id
--
XXXXXXXXXXXXXXXXXaaa098
Retrieving Nested Values
You can use dot notation to access nested variables within API commands by filtering or searching. This method allows you to traverse through variables to locate specific values.
You get the following response for the API command.
"mdm": {
"vendor": "internal",
"profileIdentifier": "com.jumpcloud.mdm",
"dep": false,
"userApproved": true,
"enrollmentType": "unknown",
"enrollmentAttempts": 0,
"createdAt": "2024-03-07T20:36:15.779Z",
"internal": {
"deviceId": "1234", <<=== Value we are targeting
"windowsDeviceId": ""
},
The following example retrieves the MDM internal device ID by filtering the System List command.
- Postman:
- Filter:
mdm.internal.deviceId:$eq:<deviceID>
- API command:
curl --location 'https://console.jumpcloud.com/api/systems?filter=mdm.internal.deviceId%3A%' \
--header 'x-api-key: API_KEY_GOES_HERE'
This approach allows the use of nested variables for efficient data retrieval and management.
Locating the User Group ID
via cURL to API
curl -X GET https://console.jumpcloud.com/api/v2/usergroups?fields=id&filter=name:eq:ENTER_USERGROUP_NAME_HERE' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: API_KEY_GOES_HERE' \
This will print out the User Group’s id and other attributes within JumpCloud. Ensure you replace ENTER_USERGROUP_NAME_HERE with the target User Group’s name, and replace API_KEY_GOES_HERE with your JumpCloud Admin API Key.
Example Output
[{"attributes":null,"id":"XXXXXXXXXXXXXXXXXfff321","name":"NAME_OF_USERGROUP","type":"user_group","email":"","description":""}]
via PowerShell
Get-JCGroup User -Name NAME_OF_USERGROUP_HERE | Select-Object id
Example Output
id
--
XXXXXXXXXXXXXXXXXfff321
Locating Device Group ID
via cURL to API
curl -X GET https://console.jumpcloud.com/api/v2/systemgroups?fields=id&filter=name:eq:ENTER_DEVICEGROUP_NAME_HERE' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: API_KEY_GOES_HERE' \
This will print out the Device Group’s id (otherwise known as System Group) and other attributes within JumpCloud. Ensure you replace ENTER_DEVICEGROUP_NAME_HERE with the target Device Group’s name, and replace API_KEY_GOES_HERE with your JumpCloud Admin API Key.
Example Output
[{"attributes":null,"id":"XXXXXXXXXXXXXXXXXeee789","name":"NAME_OF_SYSTEMGROUP","type":"system_group","email":"","description":""}]
via PowerShell Module
Get-JCGroup System -Name DEVICEGROUP_NAME_HERE | Select-Object id
Example Output
id
--
XXXXXXXXXXXXXXXXXeee789
Locating SSO Application ID
via cURL to API
curl -X GET https://console.jumpcloud.com/api/applications?fields=id&filter=name:$eq:ENTER_APPLICATION_NAME_HERE' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: API_KEY_GOES_HERE' \
This will print out the Application’s id. Ensure you replace ENTER_APPLICATION_NAME_HERE with the target Device Group’s name, and replace API_KEY_GOES_HERE with your JumpCloud Admin API Key.
Example Output
{"totalCount":1,"results":[{"id":"XXXXXXXXXXXXXXXXXccc098","_id":"XXXXXXXXXXXXXXXXXccc098"}]}
via PowerShell Module
Get-JcSdkApplication | where name -EQ "NAME_OF_APPLICATION" | select-object Id
Example Output
id
--
XXXXXXXXXXXXXXXXXccc098
Locating RADIUS NetworkID
The JumpCloud API cannot filter RADIUS down to a singular network without the objectID. You can get the objectID from the Admin Portal, or via PowerShell instead. In this API endpoint, it lists all RADIUS servers within the organization. You will be able to see all configured RADIUS servers, their configurations, and Ids.
JumpCloud generally recommends using PowerShell Module as it's easier to pull information with filtering and additional arguments. The following example shows how the JumpCloud PowerShell Module is more flexible in pulling information from the API.
via cURL to API
curl -X GET https://console.jumpcloud.com/api/radiusservers
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: API_KEY_GOES_HERE' \
Example Output
{"totalCount":2,"results":[{"_id":"XXXXXXXXXXXXXXXXXccc456","id":"XXXXXXXXXXXXXXXXXccc456","authIdp":"JUMPCLOUD","mfa":"ENABLED","name":"RADIUS_SERVER_1","networkSourceIp":"X.X.X.X","organization":"XXXXXXXXXXXXXXXXXXXX","sharedSecret":"SHARED_SECRET","userLockoutAction":"REMOVE","userPasswordExpirationAction":"REMOVE","userPasswordEnabled":true,"userCertEnabled":false,"deviceCertEnabled":false,"caCert":""},{...}]}
via PowerShell Module
Get-JcSdkRadiusServer | where name -EQ "RADIUS_SERVER_NAME_HERE" | select-object id
Example Output
id
--
XXXXXXXXXXXXXXXXXccc456
Locating Device PolicyID
via cURL to API
curl -X GET https://console.jumpcloud.com/api/v2/systemgroups?fields=id&filter=name:eq:DEVICE_POLICY_NAME_HERE' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'x-api-key: API_KEY_GOES_HERE' \
This will print out the Device Policy’s id along with all of the other associated attributes. Ensure you replace ENTER_DEVICE_POLICY_NAME_HERE with the target Device Policy’s name, and replace API_KEY_GOES_HERE with your JumpCloud Admin API Key.
If you would like to pull just the ID, we recommend using the PowerShell Module, or using additional regex commands post cURL.
Example Output
[{"template":{"id":"XXXXXXXXXXXXXXXXXeee000","name":"DEVICE_POLICY_NAME","activation":"The policy will take effect on the next reboot.",...}}]
via PowerShell Module
Get-JcSdkPolicy | where name -EQ "DEVICE_POLICY_NAME_HERE" | select-object id
Example Output
id
--
XXXXXXXXXXXXXXXXXeee000
Other objects within JumpCloud
If you’re looking to pull the objectIDs of other objects or items within the JumpCloud platform, you can reference JumpCloud’s API Documentation or the Wiki for JumpCloud’s PowerShell Module.
If you'd rather pull ObjectIDs from the Admin Portal GUI, see Retrieve Object IDs from the Admin Portal.