Office 365 calendar integration with NetSuite(documentation).

      Integration with Microsoft office 365 with NetSuite.

  1. For integrating office 365 with NetSuite, an office 365 account (work or school account) with a subscription is needed. (Trial subscription of office 365E3 link  www.aka.ms/jsn2ec)
  2. Connect your Microsoft 365 account with Microsoft Azure.
  3. Then create a new app in Azure active directory with relevant information.

4. Then you can see the client_id and tenant_id.


5. After giving relevant permissions, you can provide the scope for the app.


6. Then must check availability of your Azure application in your Microsoft 365 accounts.

7. Then create an access token for calling API.


For using your access token you can call other endpoints like calendars, events, users, group, etc.

For example: pull calendar details from office 365 using graph URL endpoints:

First, you get user id using an API call with the endpoint: https://graph.microsoft.com/v1.0/users

Then call API to pull calendar data using Microsoft graph endpoint.

With access token as authorization.

https://graph.microsoft.com/v1.0/users/97f85a37-27ee-4948-92c4-bb268e3bef7b/calendars



For live sync, you must create Microsoft Flow for the trigger. The Flow helps to live sync, it will send an email when create or update new events in NetSuite.

We must create an email plugin for capturing the trigger from office 365. And written query for finding last modified events within 5 minutes of time gap.

example:-

‘https://graph.microsoft.com/v1.0/users/’ + userId + ‘/events?$filter=(lastModifiedDateTime ge ‘ + thiryMinuteAgo + ‘) and (lastModifiedDateTime le ‘ + currentTimeDate + ‘)’

 And you will get all events between the time span of 5 minutes and take “ID” from the event as a unique value. The values set as a custom field of an event record. And create the search for finding duplicate value. If id is already available it will update using new values and id is empty in the field create new event record.



Leave a comment

Your email address will not be published. Required fields are marked *