Home

Get-AzureADUser -searchstring error: Request_UnsupportedQuery

%3CLINGO-SUB%20id%3D%22lingo-sub-453406%22%20slang%3D%22en-US%22%3EGet-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-453406%22%20slang%3D%22en-US%22%3E%3CP%3EDoing%20some%20PowerShell%20scripting%20and%20ran%20into%20a%20problem%20using%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGet-AzureADUser%20-SearchString%20%22%5BReally%20anything%20here%5D%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELast%20week%20it%20was%20fine.%20I%20have%20not%20updated%20my%20AzureADPreview%20module.%20Today%20my%20search%20errors%20out%20with%20a%26nbsp%3B%3CSTRONG%3ERequest_UnsupportedQuery%3C%2FSTRONG%3E%20with%20the%20following%20message%3A%20%3CSTRONG%3EUnsupported%20or%20invalid%20query%20filter%20clause%20specified%20for%20property%20'userState'%20of%20resource%20'User'.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20confirm%20or%20deny%20this%20as%20a%20local%20problem%20(ie%2C%20a%20problem%20on%20my%20machine%20vs%20a%20problem%20you%20can%20replicate%20on%20your%20machine)%3F%3CBR%20%2F%3E%3CBR%20%2F%3EUsing%20AzureADPreview%202.0.2.17%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-453406%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20AD%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-456632%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-456632%22%20slang%3D%22en-US%22%3E%3CP%3EYup%2C%20same%20issue%20here.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-475011%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-475011%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F299220%22%20target%3D%22_blank%22%3E%40Mats_Warnolf%3C%2FA%3E%26nbsp%3BI'm%20seeing%20the%20same%20problem%20for%20the%20past%20couple%20days.%20I%20have%20a%20case%20open%20with%20Microsoft%2C%20but%20they're%20still%20investigating%20at%20this%20time.%20I've%20tested%20with%20both%20the%20current%20AzureAD%20module%20and%20the%20current%20AzureADPreview%20module%2C%20same%20result%20either%20way.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-477460%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-477460%22%20slang%3D%22en-US%22%3EThank%20you.%20Please%20update%20this%20thread%20with%20any%20information%20you%20get.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-482117%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-482117%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F299220%22%20target%3D%22_blank%22%3E%40Mats_Warnolf%3C%2FA%3E%26nbsp%3BNo%20update%20so%20far%2C%20but%20my%20ticket%20is%20sitting%20with%20the%20AzureAD%20PowerShell%20Product%20Group.%20I'll%20reply%20back%20again%20whenever%20we%20get%20resolution%20on%20the%20issue.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-532175%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-532175%22%20slang%3D%22en-US%22%3ENo%20real%20update%20at%20this%20time%2C%20but%20the%20problem%20has%20been%20isolated%20to%20the%20Graph%20interface.%20The%20ticket%20has%20been%20routed%20to%20that%20team%20for%20additional%20troubleshooting.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-540878%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-540878%22%20slang%3D%22en-US%22%3E%3CP%3EIt's%20crazy%20that%20this%20issue%20is%20still%20an%20issue%20for%20multiple%20versions%20of%20the%20AzureAD%20module.%20I%20thought%20it%20was%20only%20occurring%20for%20the%20past%20week%2C%20but%20it's%20looking%20closer%20to%20a%20month%20now.%20I%20had%20tested%202.0.2.15%2C%20.16%2C%20and%20.17%20before%20I%20found%20this%2C%20all%20with%20the%20same%20issue.%20Interestingly%20the%20MSOL%20module%20version%26nbsp%3B1.1.183.8%20still%20works.%20I%20know%20it's%20lazy%2C%20but%20I've%20been%20using%20it%20to%20search%20by%20SearchString%2C%20then%20taking%20the%20object%20id%20and%20pumping%20it%20into%20Get-AzureADUser.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3EGet-AzureADUser%20-ObjectId%20%24(Get-MsolUser%20-SearchString%20name%40domain.tld).ObjectID%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-570234%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-570234%22%20slang%3D%22en-US%22%3EFYI%2C%20this%20fix%20is%20slated%20to%20be%20released%20in%20the%20last%20week%20of%20May.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-570388%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-570388%22%20slang%3D%22en-US%22%3EOh!%20Great.%20Tell%20me%20how%20you%20know%20this%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-570394%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-570394%22%20slang%3D%22en-US%22%3EI%20believe%20he%20had%20a%20premier%20case%20open%20on%20this.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-570396%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-570396%22%20slang%3D%22en-US%22%3EYes%2C%20I%20remember%20now.%20It%20would%20be%20great%20to%20learn%20more!%20Thank%20you%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-576484%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-576484%22%20slang%3D%22en-US%22%3Esame%20for%20me%2C%3CBR%20%2F%3Ewas%20working%20in%3A%202.0.1.16%3CBR%20%2F%3EBroke%20in%202.0.2.16%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-576507%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-576507%22%20slang%3D%22en-US%22%3Eworkaround%20for%20me%3A%3CBR%20%2F%3E%3CBR%20%2F%3EImport-Module%20azuread%20-MaximumVersion%20%222.0.1.16%22%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-694799%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-694799%22%20slang%3D%22en-US%22%3E%3CP%3ESame%20problem%20with%26nbsp%3B%3CFONT%3EAzureADPreview%202.0.2.17%20modules%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-711380%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-711380%22%20slang%3D%22en-US%22%3EThis%20is%20fixed%20with%20the%20latest%20release%20of%20the%20AzureADPreview%20module.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-768507%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-768507%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F182364%22%20target%3D%22_blank%22%3E%40Brandon%20Shea%3C%2FA%3E%26nbsp%3BWhere%20would%20one%20fine%20the%20official%20AzureADPreview%20to%20download%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2.0.2.16%20is%20still%20broke%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-768548%22%20slang%3D%22en-US%22%3ERe%3A%20Get-AzureADUser%20-searchstring%20error%3A%20Request_UnsupportedQuery%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-768548%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F103894%22%20target%3D%22_blank%22%3E%40Josh%20Vader%3C%2FA%3E%26nbsp%3Byou%20should%20be%20able%20to%20update%20that%20any%20time%20by%20running%20Update-Module%20as%20an%20administrator%20in%20PowerShell.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Mats_Warnolf
Occasional 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 2.0.2.17

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 2.0.2.15, .16, and .17 before I found this, all with the same issue. Interestingly the MSOL module version 1.1.183.8 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: 2.0.1.16
Broke in 2.0.2.16
workaround for me:

Import-Module azuread -MaximumVersion "2.0.1.16"

Same problem with AzureADPreview 2.0.2.17 modules

 

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

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

 

2.0.2.16 is still broke

 

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

Related Conversations
Extentions Synchronization
ChirmyRam in Discussions on
3 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
9 Replies