Remove-EntraContact does not work
Thanks for reporting the bug. Please ensure you've gone through the following checklist before opening an issue:
- Make sure you can reproduce this issue using the latest released version of
Microsoft.Graph.EntraorMicrosoft.Graph.Entra.Beta. - Please search the existing issues to see if there has been a similar issue filed.
Describe the bug
A clear and concise description of what the bug is. When trying to use this method, the API responds with the following error: Remove-MgContact_Delete1: Data contract version does not allow 'Delete' operations against instances of resource 'OrgContact'.
To Reproduce Steps to reproduce the behavior:
- Connect-Entra -Scopes Contacts.ReadWrite
- Get-Get-EntraContact $ObjectID
- Remove-EntraContact $ObjectID #Response: Remove-MgContact_Delete1: Data contract version does not allow 'Delete' operations against instances of resource 'OrgContact'.
I'm guessing the reason for this is that in the old API, Microsoft Graph (and the error points to using the old API behind the scenes), the OrgContact is a read-only value: https://learn.microsoft.com/en-us/graph/api/resources/orgcontact?view=graph-rest-1.0
Expected behavior Contact being deleted.
Thank you for highlighting this issue, @sergio-re. You're correct—orgContact is currently read-only.
What next?
We're collaborating with the API owner to resolve this and will provide updates as progress is made.
Related issues:
https://github.com/microsoftgraph/entra-powershell/issues/1287
Related issue #1287