Microsoft Entra Suite Tech Accelerator
Aug 14 2024, 07:00 AM - 09:30 AM (PDT)
Microsoft Tech Community

Get-AzureADUser -searchstring error: Request_UnsupportedQuery

Copper Contributor

Doing some PowerShell scripting and ran into a problem using


Get-AzureADUser -SearchString "[Really anything here]"


Last week it was fine. I have not updated my AzureADPreview module. Today my search errors out with a Request_UnsupportedQuery with the following message: Unsupported or invalid query filter clause specified for property 'userState' of resource 'User'.


Can anyone confirm or deny this as a local problem (ie, a problem on my machine vs a problem you can replicate on your machine)?

Using AzureADPreview

16 Replies

Yup, same issue here. 

@Mats_Warnolf I'm seeing the same problem for the past couple days. I have a case open with Microsoft, but they're still investigating at this time. I've tested with both the current AzureAD module and the current AzureADPreview module, same result either way.

Thank you. Please update this thread with any information you get.

@Mats_Warnolf No update so far, but my ticket is sitting with the AzureAD PowerShell Product Group. I'll reply back again whenever we get resolution on the issue.

No real update at this time, but the problem has been isolated to the Graph interface. The ticket has been routed to that team for additional troubleshooting.

It's crazy that this issue is still an issue for multiple versions of the AzureAD module. I thought it was only occurring for the past week, but it's looking closer to a month now. I had tested, .16, and .17 before I found this, all with the same issue. Interestingly the MSOL module version still works. I know it's lazy, but I've been using it to search by SearchString, then taking the object id and pumping it into Get-AzureADUser.


Get-AzureADUser -ObjectId $(Get-MsolUser -SearchString name@domain.tld).ObjectID

FYI, this fix is slated to be released in the last week of May.
Oh! Great. Tell me how you know this?
I believe he had a premier case open on this.
Yes, I remember now. It would be great to learn more! Thank you
same for me,
was working in:
Broke in
workaround for me:

Import-Module azuread -MaximumVersion ""

Same problem with AzureADPreview modules


This is fixed with the latest release of the AzureADPreview module.

@Brandon Shea Where would one fine the official AzureADPreview to download? is still broke


@Josh Vader you should be able to update that any time by running Update-Module as an administrator in PowerShell.