Forum Discussion
ndrw
Jun 26, 2025Copper Contributor
Microsoft Graph API : Some attributes are null when filtering by signInActivity/lastSignInDateTime
Hi. I have trouble retrieving the user's givenName and surname using Microsoft Graph API together with filtering using signInActivity/lastsignInDateTime. Here is the url I'm using: const g...
ndrw
Jul 08, 2025Copper Contributor
Update : After submitting a Microsoft Support ticket about the issue, the MS support team confirmed that this is a design limitation. Their suggestion is to retrieve the data in 2 steps:
- Filter by the LastSignInDateTime date range. The results will contain the ID of the user.
- For each of the results in #1, do a second query to search by ID
url3 = "https://graph.microsoft.com/V1.0/users?$top=10&$filter=id eq 'xxx'&$select=id,givenName,surname,identities"
You can fill in the value for 'xxx' by looping through the results of #1.