Managing external identities to enable secure access for partners, customers, and other non-employees
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:
- The user's display name is not set in their Azure AD profile. In this case, the
userDisplayNamefield will display the user ID instead of their name. - 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