400 Bad Request When Creating OnlineMeetings Resource

Dame Lyngdoh 1 Reputation point
2021-08-10T07:23:50.117+00:00

I am trying to create an OnlineMeetings resource using Graph API. I have the necessary credentials and permissions for accessing the API using OAuth 2.0 Authorization Code Flow, thereby acquiring an access token. I have verified the validity of the token using https://graph.microsoft.com/v1.0/me.

The issue I am facing right now is regarding onlineMeetings payload. I have specified all necessary fields for OnlineMeetings object using these two references (reference 1, reference 2), but the API (https://graph.microsoft.com/v1.0/me/onlineMeetings) returns a 400 Bad Request with the following message:

{  
	"error": {  
		"code": "General",  
		"message": "Request payload cannot be null.",  
		"innerError": {  
			"request-id": "<some_request_id>",  
			"date": "2021-08-10T07:16:25",  
			"client-request-id": "<some_client_request_id>"  
		}  
	}  
}  

I have used this API last month and the meeting resource was successfully created. Prior to that I encountered the same issue and realized that some fields were missing and proceeded to adding those missing fields to the body. Now, I have exhausted the fields and I don't know what exactly is missing from the body.

The body for the onlineMeetings resource is as follows:

{  
	"allowAttendeeToEnableCamera": true,  
	"allowAttendeeToEnableMic": true,  
	"allowMeetingChat": "enabled",  
	"allowTeamworkReactions": false,  
	"isBroadcast": false,  
	"broadcastSettings": {  
		"allowedAudience": "everyone",  
		"isRecordingEnabled": true,  
		"isAttendeeReportEnabled": true  
	},  
	"subject": "First Test Interview",  
	"isEntryExitAnnounced": true,  
	"startDateTime": "2021-08-09T17:50:34.2444915",  
	"endDateTime": "2021-08-09T17:53:34.2444915",  
	"allowedPresenters": "organization",  
	"lobbyBypassSettings": {  
		"scope": "organization",  
		"isDialInBypassEnabled": true  
	},  
	"participants": {  
        "attendees": [  
            {  
                "identity": {  
                    "user": {  
                        "id": "<a_valid_upn_1>",  
                        "displayName": "<name_1>"  
                    }  
                },  
                "upn": "<a_valid_upn_1>",  
                "role": "presenter"  
            }  
        ],  
        "organizer": {  
            "identity": {  
                "user": {  
                    "id": "<a_valid_upn_2>",  
                    "displayName": "<name_2>"  
                }  
            },  
            "upn": "<a_valid_upn_2>",  
            "role": "presenter"  
        }  
    }  
}  
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,715 questions
{count} votes

1 answer

Sort by: Most helpful
  1. JosephXu-MSFT 531 Reputation points
    2021-08-11T03:15:05.31+00:00

    Hi @Dame Lyngdoh , I found that this error is caused by your date format.
    You should change to UTC datetime format as follows:

       "startDateTime":"2019-07-12T14:30:34.2444915-07:00",  
         "endDateTime":"2019-07-12T15:00:34.2464912-07:00",  
    
    0 comments No comments