-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get-MGBetaDirectoryDeletedItemAsUser Needs -ConsistencyLevel Switch #2612
Comments
Hello @RichWorld-Tech, thanks for raising the issue. While the commandlet doesn't have a |
related metadata repo issue microsoftgraph/msgraph-metadata#578 |
@calebkiage Thank you for the reply and the temporary solution. Get-MGBetaDirectoryDeletedItemAsUser -search "OnPremisesSamAccountName:$identity" -headers @{"ConsistencyLevel" = "Eventual"} Works as expected. As a side note it would be preferred that if "-consistancylevel eventual" is required for every search then it should be a default built into all commands. if you needed to change the -consistancylevel then you can specify as an option but other than that I do not see why it is required on all searches. for all commands .it is just extra code that has to be typed and dealt with. This is similar to the way Export-csv requires the -notypeinformation as the default. |
This is an old issue already reported by many, see #513 |
@RichWorld-Tech, I'm happy to help. 🙂 The header is not required for all requests, so we can't really add it as a default. We depend on the OpenAPI description file to tell us which endpoints use that header. Since the workaround works and there's another issue that is similar, I'll close this one for now. |
Hi Microsoftgraph/Msgraph-Sdk-Powershell,
When I run the below cmdlet, I am not getting the output as intended. Below
are a few items which don't show the status for.Appreciate if you can
suggest a workaround.
CreatedBy
LoginStatus
LastModifiedBy
Loginstatus
Peripherals Health
SoftwareUpdateHealth
Get-MgBetaTeamworkDeviceHealth -TeamworkDeviceId
cfdfjh7t-0000-9999-c12c-cdb9cc5xxxxx | fl
Connection :
Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTeamworkConnection
CreatedBy :
Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphIdentitySet
CreatedDateTime : 1/1/0001 12:00:00 AM
HardwareHealth :
Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTeamworkHardwareHealth
Id : cfdfd17c-3241-4161-b41d-cdb9cc5fb0f4
LastModifiedBy :
Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphIdentitySet
LastModifiedDateTime : 2/2/2024 2:35:12 PM
LoginStatus :
Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTeamworkLoginStatus
PeripheralsHealth :
Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTeamworkPeripheralsHealth
SoftwareUpdateHealth :
Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTeamworkSoftwareUpdateHealth
AdditionalProperties : ***@***.***,
https://graph.microsoft.com/beta/$metadata#teamwork/devices('cfdfjh7t-0000-9999-c12c-cdb9cc5xxxxx')/health/$entity
]}
Regards,
Sunil
…On Tue, Feb 27, 2024 at 4:25 PM Caleb Kiage ***@***.***> wrote:
Hello @RichWorld-Tech <https://github.com/RichWorld-Tech>, thanks for
raising the issue. While the commandlet doesn't have a -ConsistencyLevel
option yet, it's possible to add it to the request using the -Headers
option since ConsistencyLevel is a header on the API. Are you able to use
that in your script?
—
Reply to this email directly, view it on GitHub
<#2612 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN6RKQQAV7SB4SPTBEZYPU3YVZFOJAVCNFSM6AAAAABDYCTMX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRXGYYTQMZTGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
@cgskreddy, could you please open a new issue on this? We like to keep issues on topic and closed issues don't usually get attention from the team. Thanks for your understanding. |
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
The text was updated successfully, but these errors were encountered: