Microsoft Graph Calendar API
A Microsoft API that helps customers navigate their day and enhance productivity.
687 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I need to add room to calendar event :
Example correct view with an event form outlook :
"location": {
"displayName": "MyRoom",
"locationUri": "room@mail.com",
"locationType": "conferenceRoom",
"uniqueId": "room@mail.com",
"uniqueIdType": "directory",
"address": {
"street": "",
"city": "",
"state": "",
"countryOrRegion": "",
"postalCode": ""
},
"coordinates": {}
},
But when I use this field with PHP Microsoft Graph like this :
"locations": [
{
"displayName": "MyRoom",
"locationUri": "room@mail.com",
"locationType": "conferenceRoom",
"uniqueId": "room@mail.com",
"uniqueIdType": "directory"
}
],
It doen't work, event is returned as :
"location": {
"displayName": "MyRoom",
"locationType": "default",
"uniqueId": "MyRoom",
"uniqueIdType": "private"
},
Where is my mistake ?
Thanks
Hi @Volle Cyril ,
With the following request body, calendar event is gets created.
POST /user/{user-id}/events
"location": {
"displayName": "meetingroom",
"locationUri": "meetingroom@contoso.onmicrosoft.com",
"locationType": "conferenceRoom",
"uniqueId": "meetingroom@contoso.onmicrosoft.com",
"uniqueIdType": "directory"
}
For more information please refer to user-post-events.
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".