Azure SAML passing Device ID (can be seen in the Activity Details: Sign-ins > Device info

Daniel R 0 Reputation points
2024-07-04T11:47:57.76+00:00

I'm looking for a way to populate the Device ID property that can be seen in the Activity Details: Sign-ins > Device info.

It's an Electron desktop app that uses Auth0 as an IDP that connects to Azure by using SAML.

I can modify the "Request Template" and I thought that I could add the Device ID to the request template

Is there a SAML attribute that Azure is parsing to fetch the Device ID? or how can I pass the Device ID to Azure?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,597 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Dillon Silzer 56,601 Reputation points
    2024-07-04T20:32:27.67+00:00

    Hi Daniel,

    You can get the device ID via Graph API:

    Example 1: Get a device

    https://learn.microsoft.com/en-us/graph/api/device-get?view=graph-rest-1.0&tabs=http#example-1-get-a-device

    HTTP Response:

    HTTP/1.1 200 OK
    Content-type: application/json
    
    {
      "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#devices/$entity",
      "@odata.id": "https://graph.microsoft.com/v2/72f988bf-86f1-41af-91ab-2d7cd011db47/directoryObjects/000005c3-b7a6-4c61-89fc-80bf5ccfc366/Microsoft.DirectoryServices.Device",
      "accountEnabled":false,
      "deviceId":"6fa60d52-01e7-4b18-8055-4759461fc16b",
      "displayName":"DESKTOP-858MANH",
      "id": "000005c3-b7a6-4c61-89fc-80bf5ccfc366",
      "operatingSystem":"Windows",
      "operatingSystemVersion":"10.0.19043.1165"
    }
    
    

    If this is helpful please accept as answer or upvote.

    Best regards,

    Dillon Silzer, Director | Cloudaen.com | Cloudaen Computing Solutions


  2. Navya 6,770 Reputation points Microsoft Vendor
    2024-07-09T09:10:45.19+00:00

    Hi @Daniel R

    Thank you for posting this in Microsoft Q&A.

    I understand that you want to populate device ID in SAML response.

    Is there a SAML attribute that Azure is parsing to fetch the Device ID? or how can I pass the Device ID to Azure?

    There is no SAML attribute that Azure is parsing to fetch device ID. By default, the Microsoft identity platform issues a SAML token to an application that contains a claim with a value of the user's username (also known as the user principal name), which can uniquely identify the user. The SAML token also contains other claims that include the user's email address, first name, and last name. SAML attribute claims include user attributes and directory extension attributes.

    For more information: https://learn.microsoft.com/en-us/entra/identity-platform/saml-claims-customization

    Hope this helps. Do let us know if you any further queries.

    Thanks,

    Navya.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.