Hi @Amitkumar Bhatt ,
While creating a event using Graph API we can add room resource by inviting the room resource as an attendee to a meeting.
For example:
POST https://graph.microsoft.com/v1.0/me/events
{
"subject": "Let's go for lunch",
"body": {
"contentType": "HTML",
"content": "Does noon work for you?"
},
"start": {
"dateTime": "2022-02-08T12:00:00",
"timeZone": "India Standard Time"
},
"end": {
"dateTime": "2022-02-08T14:00:00",
"timeZone": "India Standard Time"
},
"location": {
"displayName": "Harry's Bar"
},
"attendees": [
{
"emailAddress": {
"address": "yyyy@X .onmicrosoft.com"
},
"type": "required"
},
{
"emailAddress": {
"address": "room3@X .onmicrosoft.com"
},
"type": "resource"
}
],
"allowNewTimeProposals": true,
"transactionId": "7E823256-7762-4BEB-A1G6-749EA81735A7"
}
when we are trying to create the same event with same resource the room resource will give the declined message to organizer.
Meeting request from organizer side will be created and the invitation to other attendees will also be send. you are getting declined message back because the room resource is managed by the server and it will return the message based on the free/busy schedule and the event won't create in room resource calendar but it will created in the organizer and other attendees calendar.
Here meeting room is considered like other attendees and it is a default behavior that if one attendee declines the meeting it doesn't remove the organizers meeting request.
Reference:https://learn.microsoft.com/en-us/graph/api/user-post-events?view=graph-rest-1.0&tabs=http
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".