i'm trying to execute with powershell follow query:
$upn = "[email protected]"
$URL = "https://graph.microsoft.com/v1.0/users?$filter=mail eq '$upn'"
#Send Request
Invoke-RestMethod -Method GET -Uri $URL -Headers $headers
command run but does not return the user in the query but the list of first 100 users. On ms doc the url is that one. What is wrong?
The service principal that i'm using have user.readwrite.all permission