Are the organizer and isOrganizer Attributes in MS-Graph event working?

眉间皱痕 提交于 2021-01-28 02:06:16

问题


I'm trying to use the MS Graph API to create a new event with a technical user on behalf of a resource. The event is created, but the organizer and isOrganizer Attributes are not considered or ignored in the response.

I tried multiple requests as well as in 'v1.0' and 'beta' mode. In this SO question How to create event where current user not organizer using Microsoft Graph API it is stated that this is not implemented at the time of the original post (2016). But I didn't find anything in the Graph-API docs, saying that this would not work.

This is the request body:

{
                "subject": "Instant Meeting: " + user_name,
                "body": {
                    "contentType": "HTML",
                    "content": "Dieser Termin wurde vom Konferenzraum eingestellt"
                },
                "isOrganizer": "false",
                "organizer" : {
                    "emailAddress": {
                        "address":user_email,
                        "name": user_name
                    }
                }, 
                "start": {
                    "dateTime": start,
                    "timeZone": "Europe/Berlin"
                },
                "end": {
                    "dateTime": end,
                    "timeZone": "Europe/Berlin"
                },
                "location":{
                    "displayName": room.get('name'),
                    "locationEmailAddress": room.get('email'),
                    "locationType" : "conferenceRoom"
                },
                "attendees": [
                    {
                    "emailAddress": {
                        "address":user_email,
                        "name": user_name
                        },
                    "type": "required"
                    },
                    {
                    "emailAddress": {
                        "address":room.get('email'),
                        "name": room.get('name')
                        },
                    "type": "resource"
                    }
                ]
                }

The relevant parts of the response are:

response.get('organizer')

{'emailAddress': {'address': 'testraum-nichtbuche...t-mail.de', 'name': 'TestRaum - NICHT BUCHEN'}}
'emailAddress': {'address': 'testraum-nichtbuche...t-mail.de', 'name': 'TestRaum - NICHT BUCHEN'}
__len__: 1

response.get('isOrganizer')

True

If this worked properly, I would expect the 'organizer' to be user_email and the flag to be set to False.

Can anyone provide a working example for this?

Thanks!


回答1:


This behavior has not changed. The organizer and isOrganizer properties cannot be defined by the caller, they are automatically assigned by Exchange:

  • setting event organizer with Outlook Calendar REST API

  • Outlook Calendar Rest API (create meeting using /me/events request with change organizer)

  • outlook.com rest api incorrect organizer email

  • How to create event where current user not organizer using Microsoft Graph API



来源:https://stackoverflow.com/questions/56165042/are-the-organizer-and-isorganizer-attributes-in-ms-graph-event-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!