I wanted to check that while creating new Event using Api need to check that is there any event present or create on same date and time.I mean how to check conflicting calendar event during creating new event using Rest API?
Any help must appreciate.
Thanks in advance.
Instead of find the conflicts for the calendar event, we can use the Find meeting times feature (preview).
Here is an example for your reference:
POST https://outlook.office.com/api/beta/me/findmeetingtimes
Prefer: outlook.timezone="Pacific Standard Time"
Content-Type: application/json
{
"Attendees": [
{
"Type": "Required",
"EmailAddress": {
"Address": "fannyd#prosewareltd.onmicrosoft.com"
}
}
],
"TimeConstraint": {
"Timeslots": [
{
"Start": {
"Date": "2016-05-20",
"Time": "7:00:00",
"TimeZone": "Pacific Standard Time"
},
"End": {
"Date": "2016-05-20",
"Time": "17:00:00",
"TimeZone": "Pacific Standard Time"
}
}
]
},
"MeetingDuration": "PT1H"
}
Refer to here about more detail.
Related
How can I update/set the host controls' Quick Add settings to off while creating event using google calendar api. I want to achieve that when the host is not present in the meeting, no one else can join.
Image showing host controls:
My current api call in javascript is provided below which successfully creates the event.
gapi.client.calendar.events.insert({
"calendarId": "primary",
"conferenceDataVersion": 1,
"resource": {
"end": {
"date": eDate
},
"start": {
"date": sDate
},
"conferenceData": {
"createRequest": {
"conferenceSolutionKey": {
"type": "hangoutsMeet"
},
"requestId": "#(new Guid().ToString())"
}
},
"summary": "#(Model.Title+" Class Meeting")"
}
})
I have read the documentation as well but cannot find this setting. https://developers.google.com/calendar/api/v3/reference/events/insert
I built a MS Teams Add-In. If I create a new meeting, I have to add the Add-In every time manually to this meeting.
Is there any way to integrate it to every (new) meeting by default?
Thank you!
Currently there is no way to integrate automatic addin in meeting. Alternatively you can create an event as online meeting using Graph API with below request.
POST https://graph.microsoft.com/v1.0/me/events
Prefer: outlook.timezone="Pacific Standard Time"
Content-type: application/json
{
"subject": "Let's go for lunch",
"body": {
"contentType": "HTML",
"content": "Does noon work for you?"
},
"start": {
"dateTime": "2017-04-15T12:00:00",
"timeZone": "Pacific Standard Time"
},
"end": {
"dateTime": "2017-04-15T14:00:00",
"timeZone": "Pacific Standard Time"
},
"location":{
"displayName":"Harry's Bar"
},
"attendees": [
{
"emailAddress": {
"address":"samanthab#contoso.onmicrosoft.com",
"name": "Samantha Booth"
},
"type": "required"
}
],
"allowNewTimeProposals": true,
"isOnlineMeeting": true,
"onlineMeetingProvider": "teamsForBusiness"
}
Please go through this documentation for more info.
When creating an calendar event via MS Graph API the event looks different in the OWA and the Outlook Client.
In the Outlook client the event shows up ok in the overview, but when looking at the details it is shown in UTC instead of my timezone (Western Europe) and I cannot click/unclick the timezone button. If I open the same event in OWA it shows up in the correct timezone. Also if I send the event to another organisation it also shows up ok.
This leads me to believe it's something in our outlook client, but then I cannot see any difference in the graph API between events created from Outlook directly (looks ok) and the ones created via a rest call.
This is my payload
{
"subject": "tEST",
"organizer": {
"emailaddress": {
"address": "<email>"
}
},
"start": {
"dateTime": "2019-10-09T08:01:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2019-10-09T09:01:00.0000000",
"timeZone": "UTC"
},
"attendees": [
{
"emailAddress": {
"name": "Mattias Johansson",
"address": "<email>"
},
"type": "optional"
}
],
"reminderminutesbeforestart": 15
}
and this is a screenshot of the booking, the time is slightly different since it's another booking than the payload.
I am using the Office365 API for calendar events. I am able to create an event successfully with Extensions (custom data) like below...
But, when I get calendar events it does not return back any Extensions data field.
GET https://outlook.office.com/api/v2.0/me/events
How do I get the Extensions back in the events data?
POST: https://outlook.office.com/api/v2.0/me/events
authorization: bearer {token}
content-type: application/json
{
"Subject": "Discuss the Calendar REST API",
"Body": {
"ContentType": "HTML",
"Content": "I think it will meet our requirements!"
},
"Start": {
"DateTime": "2016-09-06T18:00:00",
"TimeZone": "Pacific Standard Time"
},
"End": {
"DateTime": "2016-09-06T18:00:00",
"TimeZone": "Pacific Standard Time"
},
"Extensions": [
{
"#odata.type": "Microsoft.OutlookServices.OpenTypeExtension",
"ExtensionName": "Com.Contoso.Referral",
"CompanyName": "Wingtip Toys",
"ExpirationDate": "2015-12-30T11:00:00.000Z",
"DealValue": 10000,
"TopModels": [
3001,
4002,
5003
],
"TopSalespersons": [
"Dana Swope",
"Fanny Downs",
"Randi Welch"
]
}]
}
You could get extension using the below api:
GET https://outlook.office.com/api/v2.0/me/events('{event_id}')/extensions('{extensionId}')
For example:
GET https://outlook.office.com/api/v2.0/me/messages('AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl===')/extensions('Com.Contoso.Referral')
For more information, please refer to the below link:
Get extension
We have an office365 setup and use the mail and calendar API to ingrate with our enviremenet.
Is it possible to add a custom field to calendar entry and be able to access and update via the calendar API?
We can use the data extension API to store custom data in a message, event, or contact of the user's account.
Here is an example that to create extension when create an appointment:
POST: https://outlook.office.com/api/v2.0/me/events
authorization: bearer {token}
content-type: application/json
{
"Subject": "Discuss the Calendar REST API",
"Body": {
"ContentType": "HTML",
"Content": "I think it will meet our requirements!"
},
"Start": {
"DateTime": "2016-09-06T18:00:00",
"TimeZone": "Pacific Standard Time"
},
"End": {
"DateTime": "2016-09-06T18:00:00",
"TimeZone": "Pacific Standard Time"
},
"Extensions": [
{
"#odata.type": "Microsoft.OutlookServices.OpenTypeExtension",
"ExtensionName": "Com.Contoso.Referral",
"CompanyName": "Wingtip Toys",
"ExpirationDate": "2015-12-30T11:00:00.000Z",
"DealValue": 10000,
"TopModels": [
3001,
4002,
5003
],
"TopSalespersons": [
"Dana Swope",
"Fanny Downs",
"Randi Welch"
]
}]
}
Get the extension on a exist object:
GET https://outlook.office.com/api/v2.0/me/events/{eventId}/extensions('{extensionId}')
GET https://outlook.office.com/api/v2.0/me/events/{eventId}/extensions('Microsoft.OutlookServices.OpenTypeExtension.Com.Contoso.Referral')
More detail about this API, you can refer here.