Description
Describe the bug
This has been an ongoing issue. The -Search cannot work because the -ConsistencyLevel Switch is not available. It is that simple. This is needed in order to automate and retrieve users in the Azure Deleted Users. The -Filter switch only works for certain properties and this function needs to be able to SEARCH on other properties to correctly identify the deleted user. The work around right now id to get all the users in the Deleted Users in Azure and filter with a Where statement. This is not acceptable because of the time it takes and the amount of data transferred. The command needs to be able to SEARCH the OnPremises* and other properties like the Get-MGBEtaUser can do. You must have the -ConsistencyLevel Switch in order for this the work with Graph just like all the other commands
To Reproduce
You can run this SEARCH command against any property. It does not matter because it throws the same error
Get-MGBetaDirectoryDeletedItemAsUser -search "onpremisisuserprincipalname:[email protected]'" -ConsistencyLevel Eventual
Expected behavior
What is expected is it will output all available data as it should.
Debug Output
Debug from above command:
Get-MgBetaDirectoryDeletedItemAsUser: A parameter cannot be found that matches parameter name 'ConsistencyLevel'.
Module Version
Using Microsoft.Graph.Beta Version 2.14.1
Environment Data
Name Value
PSVersion 7.4.1
PSEdition Core
GitCommitId 7.4.1
OS Microsoft Windows 10.0.20348
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
This happens on Windows 11 as well