Office365 Calendar REST API -- cannot delete calendars - outlook

I'm working on a project where I add and update sports calendars to a user's Outlook calendar.
I'm facing a consistent issue where I can't delete ANY calendars via the API or the desktop web application.
Every time I delete a calendar through the API, I receive the following code and message:
{
code: 'ErrorFolderExists',
message: 'A folder with the specified name already exists.'
}
Any ideas?
My API call is something like:
DELETE https://outlook.office.com/api/v2.0/me/calendars/:calendarId
The only solution I've seen is to rename the calendar and then delete it, but I'm hoping for something a little more stable.
Any help would be appreciated!

This error happens because you have deleted a calendar with the same name before; if you check your "Deleted Items" folder, you will see your previously deleted calendar. There are three ways around it:
Delete the previously deleted calendar from your "Deleted Items" folder; please note that you will not be able to recover the calendar after permanently deleting it.
Rename your previously deleted calendar
Rename the current calendar you want to delete

Related

Can't get a list owned by me in Google Calendar API

Using Google Calendar API v3 to get the calendar list.
However, some users are not able to retrieve their own owner's calendar.
I tried using the Try this API for CalendarList#list to retrieve it,
but it did not return the owner's calendar.
https://developers.google.com/calendar/v3/reference/calendarList/list
However, if the user specifies calendarId as primary in CalendarList#get,
it can be retrieved successfully.
https://developers.google.com/calendar/v3/reference/calendarList/get
Do you have any advice for me?
Can't get a list owned by me in Google Calendar API
Answer: There is no endpoint which will return a full list of all calendars Owned or that the user simply has access to. As this endpoint does not exist the answer to your question is you cant so its working as intended.
In actually you have misunderstood what the calendarlist is. See below
What is calendarList and how does it work?
The calendarList.List is mealy the list that appears on the bottom left hand side of the UI window. There is no guarantee that a user will have anything in this list as it depends upon how the user added the calendar to the list in the first place. The user could also have deleted it form the list. The UI tends to do it automatically but if it was added programmaticlly it will probably not appear it the users calendarlist. So you should not be relying upon the calendarlist to contain a list of all the calendars a user has access to. please see Events and calendars
All users do however have a primary calendar you can always do calender.get on primary and you will get back the primary calendar for that user.

File shares are not deleted when Microsoft Teams meeting member is removed

The following situation has occurred:
A meeting was planned
The automatically generated link was clicked
The automatically created meeting chat was opened
A file has been uploaded
File is stored in the personal OneDrive and a share is automatically created for the meeting members
A member was removed (Outlook -> person under "required" -> removed -> saved)
Member has been removed from the meeting chat (also displays "Name has left the conversation")
Now when I look at the file in my OneDrive, the remote employee still has access to the file
Isn't it automatically removed? Are there any tricks, special features etc.?

Microsoft Graph List Contacts API returns contacts beyond what are visible in the Outlook UI

Outlook UI
You can see that I've made three test contacts in the UI accessible here: https://outlook.live.com/people/
Microsoft Graph List Contacts API
When I call the List Contacts API (https://graph.microsoft.com/beta/me/contacts?$orderby=createdDateTime desc&$top=50), I get a list of contacts that is much more extensive than the list visible in the UI. These contacts appear to be anyone that has emailed me or anyone that I've emailed.
The problem
If I want to poll against the GET /me/contacts endpoint to get some data whenever I make a new contact, I'll end up getting notified every time someone new sends me an email or every time I send someone new an email (even if I didn't manually create the contact).
Is this intentional? If so, are there any filters I could add to specify that I don't want to get contacts that were not manually created by me? Looking over the JSON representation of a contact, I don't see anything I can filter on.
Possible Solution
My only thought is that I notice that the contacts made for me exist in a folder that is not returned in the contactFolders API endpoint. I could theoretically make a call to that endpoint and take the list of contacts returned and check if the parentFolderId exists in there. If it does, presumably that's because we created a contact and if not then it's made for us. That feels terribly hacky, though.
Thanks for the help!
This is an issue with the Microsoft Graph Beta APIs. Switching to the v1.0 of the Graph REST APIs resolved this.
It seems Outlook automatically adds every email address that had been in contact with the user as a hidden contact in a hidden folder.
The GET beta/me/contacts endpoint (unlike the v1.0 one) returns all contacts from all folders, so it also includes this hidden folder.
There are two ways to get the expected list of contacts:
Option 1 - get all contacts, and then filter:
GET /beta/me/contactFolders to obtain a list of "real" folders (this endpoint does not return that hidden folder)
GET /beta/me/contacts to get all contacts in the account
Filter the list of contacts by field parentFolderId - to keep only contacts in one of the folders returned at step 1
Option 2 - get contacts by folder:
GET /beta/me/contactFolders to obtain a list of "real" folders (this endpoint does not return that hidden folder)
for each folder returned call GET /beta/me/contactFolders/{folder-id}/contacts and aggregate the returned contact lists
Hope this helps.

Change event description for organizer using VCalendar

currently we are using outlook to create a meeting and send it to email x . Whenever imap mailbox x gets an email it automatically parses and send updated iCal file (with new description) to all participants that was added and organizer. Everything is ok for all participants, except organizer, description in outlook calendar is not updating for organizer (old description is left). I am adding Sequence + 1 , changing timestamp, but still the same problem. Does that mean that for organizer there is no possible way to change description of already created event? Maybe there is any way to do that?
Thanks in advance!
I would say that this is the expected behavior. As the organizer, you are supposed to receive only REPLY, REFRESH, COUNTER, DECLINECOUNTER IMIP message. Anything else shall be ignored.

Unable to refresh updated appointments in Service Calendar

I'm unable to refresh the Service Calendar view when I'm updating fields on an appointment record.
In this first screenshot I've created a new appointment and my Users are attached to the following fields:
Organizer: Pu Bjerre
Required: Konrad Viltersten and Annie Kruse
The created appointment gives the following view in the Service Calendar.
Now I want to update my appointment by following changes.
Rescheduled the appointment time by one hour
Removed Annie Kruse from the Required field
After I've updated my appointment and refreshed the Service Calendar, this is the view the service calender shows:
It seems that my service calender is only viewing the updates I'm adding, not the updates I'm removing. The only way I'm able to remove Annie Kruse is by closing the browser and log in again into the organization.
No idea what that depends on. Also, I'm not sure how to handle it. Is it by design? Or is it a know (mis)behavior? The usual googling led to nowhere.

Resources