0

When creating a folder in Office365 Outlook Calendar, We are getting the error as 'The Folder Already Exists', but we are not able to find such folder in the Office365 Calendar. We cross-checked for the folder with the same name in outlook web app and the client app but no folder exists with that name. Below are the API and the response.

POST https://graph.microsoft.com/v1.0/me/calendars HTTP/1.1

Request body: {"name":"New calendar"}

"error": {

    "code": "ErrorFolderExists",

    "message": "A folder with the specified name already exists.",

    "innerError": {

        "request-id": "c046eeba-f6f7-4b7e-98a3-b6a9a7055dd2",

        "date": "2018-11-08T14:16:10"

    }

}
Community
  • 1
  • 1
Navamani Samuel
  • 568
  • 2
  • 4
  • 15

1 Answers1

0

You can query for the calendar name by using a filter

https://graph.microsoft.com/v1.0/me/calendars?$filter=name eq 'New calendar'

Then delete it using a delete request and the calendars' id

https://graph.microsoft.com/v1.0/me/calendars/<insert calendar_id here>

crice1988
  • 81
  • 1
  • 10
  • We queried for the calendar using the filter and it responded with an empty array. We cannot create the calendar with the same name in Outlook UI also. So it should be a Microsoft issue. – Navamani Samuel Nov 22 '18 at 06:36
  • We found another work around. Rename the folder via a `PATCH` or through the UI. After renaming, it should allow you to delete the folder. We must've caught the tail end of a bug because we are unable to reproduce the behavior. – crice1988 Nov 28 '18 at 18:07