How is the device_id generated?

Nestor Paredes
Tera Contributor

Hello,

 

How is this value populated?

sys_auth_policy_device_app_registry.device_id

How can I check if a user is connecting from a registered device?

 

Regards,

N.

6 REPLIES 6

Shivalika
Mega Sage

Hello @Nestor Paredes 

 

Where is this ? Any background info or screenshots ? 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

sys_auth_policy_device_app_registry.device_id <- that might be part of adaptive authentication

Selva Arun
Mega Sage
Mega Sage

Hi,

 

How is the device_id generated?

The device_id in the sys_auth_policy_device_app_registry table is typically generated by ServiceNow when a device is registered as part of the authentication process. This value is unique to each device and is used to identify it within the system. The generation of the device_id may depend on the specific authentication policies and configurations in place, such as multi-factor authentication (MFA) or device-based authentication.

 

How is this value populated?

The device_id is populated when a device is registered with the system. This usually happens during the first login or authentication attempt from a new device. The registration process involves storing the device's unique identifier (e.g., a hashed value derived from device attributes) in the sys_auth_policy_device_app_registry table. This ensures that the device can be recognized in subsequent authentication attempts.

 

How can I check if a user is connecting from a registered device?

To check if a user is connecting from a registered device, you can follow these steps:

  1. Navigate to Device Registration:
    Go to All > Adaptive Authentication > Device Trust > Device Registration in your ServiceNow instance. This page displays all the registered devices.
  2. Use the filter to identify the device:
    Use the available filters to search for the device based on the user, device name, or other attributes. Click on the AppID field to view more details about the registered device.
  3. Query the sys_auth_policy_device_app_registry table:
    You can also query the table programmatically to check for registered devices. For example:

 

var gr = new GlideRecord('sys_auth_policy_device_app_registry'); 

gr.addQuery('user', '<user_sys_id>'); // Replace with the user's sys_id 

gr.query(); 

while (gr.next()) { 

    gs.print('Device ID: ' + gr.device_id); 

  1. Check authentication logs:
    Review the authentication logs to see if the device being used matches any registered devices for the user.

Device App Registration Details:

 

When viewing the details of a registered device, the following information is displayed:

  • AppID: The unique identifier for the application.
  • Device ID: The unique identifier for the device.
  • User: The user associated with the device.
  • Device Name: The name of the device.
  • Device Information, such as:
    • OS Type
    • App Flavour
    • App Version
    • OS Version
    • Device Model

Additional Notes:

  • If the device is not registered, the user may be prompted to register it during the authentication process, depending on the configured policies.
  • Ensure that the authentication policies are properly configured to enforce device registration and validation.

 

If you believe the solution provided has adequately addressed your query, could you please **mark it as 'Helpful'** and **'Accept it as a Solution'**? This will help other community members who might have the same question find the answer more easily.

 

Thank you for your consideration.

 Selva Arun

That looks like an AI generated reply =]

"

How is the device_id generated?

The device_id in the sys_auth_policy_device_app_registry table is typically generated by ServiceNow when a device is registered as part of the authentication process. This value is unique to each device and is used to identify it within the system. The generation of the device_id may depend on the specific authentication policies and configurations in place, such as multi-factor authentication (MFA) or device-based authentication.

"

That is not answering the question, maybe is my bad because I assumed it was a given:
I need to know that via script, I need to be able to tell that via script.