Restore-MgBetaDirectoryDeletedItem missing BodyParameter parameter #3318
Labels
status:waiting-for-triage
An issue that is yet to be reviewed or assigned
type:bug
A broken experience
Describe the bug
The Restore-MgBetaDirectoryDeletedItem cmdlet documents the use of the Bodyparameter parameter https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.beta.identity.directorymanagement/restore-mgbetadirectorydeleteditem?view=graph-powershell-beta to pass details of deleted object being restored with a different UPN. V2.27 of the cmdlet says that no such parameter can be found.
Expected behavior
$DeletedUserUPN = "Marc.c.Vigneau@office365itpros.com"
$NewUserPrincipalName = "Marc.B.Vigneau@office365itpros.com"
$DeletedObject = Get-MgDirectoryDeletedItemAsUser -Filter "displayName eq 'Marc Vigneau'"
$NewUPNDetails = @{}
$NewUPNDetails.Add("newUserPrincipalName",$NewUserPrincipalName)
$NewUPNDetails.Add("autoReconcileProxyConflict",$true)
$Status = Restore-MgBetaDirectoryDeletedItem -DirectoryObjectId $DeletedObject.Id -BodyParameter $NewUPNDetails
Restore-MgBetaDirectoryDeletedItem: A parameter cannot be found that matches parameter name 'BodyParameter'.
How to reproduce
See above.
SDK Version
V2.27
Latest version known to work for scenario above?
V2.25
Known Workarounds
Use Graph request
Debug output
No debug because cmdlet fails immediately
```The text was updated successfully, but these errors were encountered: