tmarwen
tmarwen

Reputation: 16354

Querying editable user calendars returns non-editable calendars

When querying editable user calendars, i.e. using the canEdit+eq+true OData filter clause, I am receiving the non-editable calendars instead.

Here down the REST query endpoint ({userId} replaced with any existing user GUID):

https://graph.microsoft.com/v1.0/users/{userId}/calendars?$filter=canEdit+eq+true

and here is the response result:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('{userId}')/calendars",
    "value": [
        {
            "id": "some-id",
            "name": "Jours fériés - France",
            "canEdit": false,
        },
        {
            "id": "some-other-id",
            "name": "Anniversaires",
            "canEdit": false,
        }
    ]
}

When querying the reverse property, i.e. the non-editable calendars, I receive the editable calendars as response payload:

Here down the REST query:

https://graph.microsoft.com/v1.0/users/{userId}/calendars?$filter=canEdit+eq+false

And below is the response result:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('{userId}')/calendars",
    "value": [
        {
            "id": "some-id",
            "name": "Calendar",
            "canEdit": true,
        }
    ]
}

Note that I omitted irrelevant fields from both response results.

Is there a know issue or am I mis-understating the canEdit property?

Upvotes: 0

Views: 48

Answers (1)

user2250152
user2250152

Reputation: 20625

Well, it's known issue according this.

Workaround can be to retrieve the editable calendars by using the canEdit eq false.

But I'm little bit affraid of it.

Upvotes: 0

Related Questions