Share via

Microsoft Graph API = auditlogs/signins API endpoint

2023-10-28T16:37:18.8333333+00:00

When I call this API endpoint https://graph.microsoft.com/v1.0/auditLogs/signIns, the results show sign-in details of 6 users, their 'userprincipalname' and 'userdisplayname' fields display user IDs instead of their names. Why is this issue specific to only these 6 users?

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Entra | Other

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-11-02T22:14:50.8433333+00:00

    Hi @Dinusha Herath | BISTEC Global , the userPrincipalName and userDisplayName fields in the auditLogs/signIns API endpoint of Microsoft Graph API are populated based on the user's Azure AD profile. If the userDisplayName field is displaying user IDs instead of their names, it could be due to the following reasons:

    1. The user's display name is not set in their Azure AD profile. In this case, the userDisplayName field will display the user ID instead of their name.
    2. The user's display name is set in their Azure AD profile, but it is not synchronized to Microsoft Graph API. This could be due to a delay in synchronization or an issue with the synchronization process.

    To troubleshoot this issue, you can check the Azure AD profile of the affected users to ensure that their display name is set correctly. You can also check the synchronization status of their Azure AD profile with Microsoft Graph API to ensure that the synchronization is working correctly.

    Additionally, you can try using the ?$select=userPrincipalName,userDisplayName query parameter in your API call to retrieve only the userPrincipalName and userDisplayName fields for the sign-ins. This can help you identify if the issue is specific to these fields or if there are other fields that are also affected.

    If you are still facing issues, please provide more information about the affected users and their Azure AD profiles, so that I can assist you better.

    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.