Unable to delete contactFolder (getting ErrorCannotDeleteObject)

Baptiste Martinet 20 Reputation points


I'm trying to do a simple delete operation on the user contact folders.

It was working fine until last sunday (05/05/2024).

Since then, I keep getting the following error:

	statusCode: 403,
	body: '{"code":"ErrorCannotDeleteObject","message":"Object cannot be deleted."}',

I'm almost certain I have all the correct Read/Write permissions and that the ids I'm passing are valid.

Here is the method I use to delete the folder:

  public async deleteUserContactFolder(userId: UserIdentifier, contactFolderId: string)
    return this._client.api(`/users/${userId}/contactFolders/${contactFolderId}`).delete();

Thanks for your help

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,824 questions
0 comments No comments
{count} votes

Accepted answer
  1. Saranya Madhu-MSFT 225 Reputation points Microsoft Vendor

    Hello Baptiste Martinet,

    Thanks for reaching Microsoft!

    I am able to replicate your issue.

    I would recommend you raise a support case with Microsoft Graph, a Support Engineer will be able to look into this issue and assist you better. You can raise support ticket from New support request - Microsoft Entra admin center or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    0 comments No comments

0 additional answers

Sort by: Most helpful