Hi All,
I wonder if we can perform server-side filtering with the Get-AzureADUser cmdlet ?
URL: https://learn.microsoft.com/en-us/powershell/module/azuread/get-azureaduser?view=azureadps-2.0#-filter
or this is just limited to the properties returned by:
Get-AzureADUser -Top 1 | Get-Member -MemberType Properties
I am trying to do the below filtering, but it does not work for all of the combinations:
Get-AzureADUser -All $true -Filter "(AccountEnabled -eq $true) -and (AssignedLicense -ne $null) -and (Mail -ne $null)"
Get-AzureADUser -All $true -Filter "(AccountEnabled -eq '$true') -and (AssignedLicense -ne '$null') -and (Mail -ne '$null')"
Get-AzureADUser -All $true -Filter "AccountEnabled eq true -and AssignedLicense ne null -and Mail ne null"
Get-AzureADUser -All $true -Filter '(AccountEnabled -eq "$true") -and (AssignedLicense -ne "$null") -and (Mail -ne "$null")'
Get-AzureADUser -All $true -Filter '(AccountEnabled -eq $true) -and (AssignedLicense -ne $null) -and (Mail -ne $null)'
Get-AzureADUser -All $true -Filter 'AccountEnabled -eq "$true" -and AssignedLicense -ne "$null" -and Mail -ne "$null"'
Get-AzureADUser -All $true -Filter 'AccountEnabled -eq $true -and AssignedLicense -ne $null -and Mail -ne $null'
Get-AzureADUser -All $true -Filter {AccountEnabled -eq $true -and AssignedLicense -ne $null -and Mail -ne $null}
Error:
Get-AzureADUser : Error occurred while executing GetUsers
Code: Request_BadRequest
Message: Syntax error
Thank you in advance.