Nice it works If y are using powershell and ms graph api (google howto toke works)
$headers = @{
"Authorization" = "Bearer $token"
"ConsistencyLevel" = "eventual"
}
# API Endpoint
$uri = "https://graph.microsoft.com/v1.0/users?`$count=true&`$select=displayName,id,department,jobtitle,extensions&`$filter=(onPremisesExtensionAttributes/extensionAttribute1 eq 'VALUE')"
# Make the API call
try {
$response = Invoke-RestMethod -Uri $uri -Headers $headers -Method Get
} catch {
Write-Host "Some Error";
Write-Host "StatusCode:" $_.Exception.Response.StatusCode.value__
Write-Host "StatusDescription:" $_.Exception.Response.StatusDescription
Continue
}