microsoftgraph / microsoftgraph/entra-powershell

Remove-EntraContact does not work

Open
#1,102 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Blocked Graph API gap P1 ToTriage
Dominant language
PowerShell
Stars
213
Forks
46
PR merge metrics
No merged PRs in 30d

Description

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.Entra or Microsoft.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:

  1. Connect-Entra -Scopes Contacts.ReadWrite
  2. Get-Get-EntraContact $ObjectID
  3. 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with Connect-Entra, Get-Get-EntraContact, and Remove-EntraContact using the reported scope and object ID. Start by tracing the Remove-EntraContact entry point and comparing its request with the OrgContact API documentation linked in the issue. Done means the expected deletion behavior is supported and verified, or the limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.