Jan 10 2020
08:01 AM
- last edited on
Jul 24 2020
01:24 AM
by
TechCommunityAP
Jan 10 2020
08:01 AM
- last edited on
Jul 24 2020
01:24 AM
by
TechCommunityAP
When I execute the query it's return all users that has the main domain and the users that has sub-domain.
Question: How can I execute a graph call and return only users with specific sub-domain along with the other filters.
$uri = "https://graph.microsoft.com/v1.0/auditLogs/signIns?$filter=appDisplayName eq 'Windows Sign In' AND deviceDetail/operatingSystem eq 'Windows' AND createdDateTime ge $CurrentDate AND endwith(userPrincipalName,'@group.maindomain.net') &$Top=1000"
Thank You,
-Larry
Jan 10 2020 11:47 AM
Jan 10 2020 12:04 PM
@Thijs Lecomte Thank you for responding, I've added the "S" and still not working. Also, I moved the endswith at the beginning of the URL. Sorry to say I can't use the onmicrosoft.com address, it doesn't have the sub-domain attached to the onmicrosoft.com address
All the other filters is working just that one filter I'm having the issue.
$uri = "https://graph.microsoft.com/v1.0/auditLogs/signIns?$filter=endswith(userPrincipalName,'southeast.xxx...') AND appDisplayName eq 'Windows Sign In' AND deviceDetail/operatingSystem eq 'Windows' AND createdDateTime ge $CurrentDate &$Top=1000"
Thank You,
-Larry
Jan 10 2020 12:07 PM
Jan 10 2020 12:55 PM
SolutionAs noted in the documentation, only startswith and eq operators are supported for userPrincipalName. Welcome to the wonderful world of crappy oData filtering...