Json 使用microsoft graph可以检查outlook日历中的用户是否可用/忙
我正在使用post请求检查用户是否可以使用Microsoft Graph。我想知道是否还有其他方法可以获得用户可用性 以下是我正在使用的呼叫示例: 请求(Json 使用microsoft graph可以检查outlook日历中的用户是否可用/忙,json,microsoft-graph-api,outlook-restapi,Json,Microsoft Graph Api,Outlook Restapi,我正在使用post请求检查用户是否可以使用Microsoft Graph。我想知道是否还有其他方法可以获得用户可用性 以下是我正在使用的呼叫示例: 请求(POST): 正文: { "attendees": [ { "emailAddress": { "address": "ricardo.guerrero@email", "name": "Ricardo Guerrero Matus" }, "type": "Req
POST
):
正文:
{
"attendees": [
{
"emailAddress": {
"address": "ricardo.guerrero@email",
"name": "Ricardo Guerrero Matus"
},
"type": "Required"
}
],
"timeConstraint": {
"ActivityDomain": "Work",
"timeslots": [
{
"start": {
"dateTime": "2018-10-05T13:00:00.000Z",
"timeZone": "Central Standard Time"
},
"end": {
"dateTime": "2018-10-05T14:00:00.000Z",
"timeZone": "Central Standard Time"
}
}
]
},
"MeetingDuration": "PT1H"
}
您可以使用检查用户是否可用/忙。如果您有许多用户,则需要逐个检查
请求:
POST https://graph.microsoft.com/beta/me/calendar/getschedule
Prefer: outlook.timezone="Pacific Standard Time"
Content-Type: application/json
{
"Schedules": ["AlexW@contoso.OnMicrosoft.com"],
"StartTime": {
"dateTime": "2018-08-06T09:00:00",
"timeZone": "Pacific Standard Time"
},
"EndTime": {
"dateTime": "2018-08-06T18:00:00",
"timeZone": "Pacific Standard Time"
},
"availabilityViewInterval": "15"
}
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.scheduleInformation)",
"value": [
{
"scheduleId": "AlexW@contoso.OnMicrosoft.com",
"availabilityView": "111111002222222200000000000000000000",
"scheduleItems": [
{
"isPrivate": false,
"status": "Tentative",
"start": {
"dateTime": "2018-08-06T09:00:00.0000000",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2018-08-06T10:30:00.0000000",
"timeZone": "Pacific Standard Time"
}
},
{
"isPrivate": false,
"status": "Busy",
"start": {
"dateTime": "2018-08-06T11:00:00.0000000",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2018-08-06T13:00:00.0000000",
"timeZone": "Pacific Standard Time"
}
}
],
"workingHours": {
"daysOfWeek": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"startTime": "08:00:00.0000000",
"endTime": "17:00:00.0000000",
"timeZone": {
"@odata.type": "#microsoft.graph.customTimeZone",
"bias": 480,
"name": "Customized Time Zone",
"standardOffset": {
"time": "02:00:00.0000000",
"dayOccurrence": 1,
"dayOfWeek": "sunday",
"month": 11,
"year": 0
},
"daylightOffset": {
"daylightBias": -60,
"time": "02:00:00.0000000",
"dayOccurrence": 2,
"dayOfWeek": "sunday",
"month": 3,
"year": 0
}
}
}
}
]
}
响应:
POST https://graph.microsoft.com/beta/me/calendar/getschedule
Prefer: outlook.timezone="Pacific Standard Time"
Content-Type: application/json
{
"Schedules": ["AlexW@contoso.OnMicrosoft.com"],
"StartTime": {
"dateTime": "2018-08-06T09:00:00",
"timeZone": "Pacific Standard Time"
},
"EndTime": {
"dateTime": "2018-08-06T18:00:00",
"timeZone": "Pacific Standard Time"
},
"availabilityViewInterval": "15"
}
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.scheduleInformation)",
"value": [
{
"scheduleId": "AlexW@contoso.OnMicrosoft.com",
"availabilityView": "111111002222222200000000000000000000",
"scheduleItems": [
{
"isPrivate": false,
"status": "Tentative",
"start": {
"dateTime": "2018-08-06T09:00:00.0000000",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2018-08-06T10:30:00.0000000",
"timeZone": "Pacific Standard Time"
}
},
{
"isPrivate": false,
"status": "Busy",
"start": {
"dateTime": "2018-08-06T11:00:00.0000000",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2018-08-06T13:00:00.0000000",
"timeZone": "Pacific Standard Time"
}
}
],
"workingHours": {
"daysOfWeek": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"startTime": "08:00:00.0000000",
"endTime": "17:00:00.0000000",
"timeZone": {
"@odata.type": "#microsoft.graph.customTimeZone",
"bias": 480,
"name": "Customized Time Zone",
"standardOffset": {
"time": "02:00:00.0000000",
"dayOccurrence": 1,
"dayOfWeek": "sunday",
"month": 11,
"year": 0
},
"daylightOffset": {
"daylightBias": -60,
"time": "02:00:00.0000000",
"dayOccurrence": 2,
"dayOfWeek": "sunday",
"month": 3,
"year": 0
}
}
}
}
]
}
比较/getSchedule
和/findMeetingTimes
: