I want to read e-mail and calendar event from gmail in SharePoint apps (provider hosted or SharePoint hosted), with current username and password. i have configured SSO between Azure AD and Google for work and able to login to Gmail Apps using azure AD user credentials. now i am stuck with how to fetch gmail email and calendar using azure ad credentials in SharePoint Provider Hosted Apps or SharePoint Hosted Apps

  • anyone with any answers Oct 30, 2016 at 6:03

1 Answer 1


i able to solve this problem. i used google service account to fetch data from Gmail and calendar. below are steps

  1. go to console.developer.google.com.
  2. create service account and store certificate file.
  3. enable your domain wide delegation for your service account.
  4. it will create client id for your service account.
  5. go to admin console -> security -> manage api page
  6. give access to https://mail.google.com and https://calendar.google.com and add your client id in client name
  7. once done create web API which will use your certificate and access gmail and calendar
  8. access your web api using ajax in sharepoint to fetch gmail and calendar data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.