2

I have created a web app in past to access calendar events from ADD user's calendars. It worked fine, Now I want to create a daemon app that can fetch the calendar events of my personal outlook account or from account of people from my organization. I followed this section of microsoft graph api docs : https://learn.microsoft.com/en-us/azure/active-directory/develop/scenario-daemon-overview

I could only get all user details present in my Azure active directory but I am unable to fetch calendar events. In my parameters.json file. I mentioned my endpoint as : https://graph.microsoft.com/v1.0/users/{user id}/events

The official docs(link given above) told that we cannot access the web API which require 'incremental consent'. I want to know can I access calendar events from daemon apps as a background service using MS graph api. If yes, please provide my any links or resource to do so. I tried searching on stackoverflow also but couldn't find any resource or doc which I can use.

Your help would be really appreciated. Thankyou.

Raghavendra beldona
  • 1,937
  • 1
  • 4
  • 9
Ayush
  • 43
  • 11

1 Answers1

0

To use client credential flow, you need to add application permissions in your registered application in Azure portal, and this permission need admin consent.

enter image description here

enter image description here

Reference:

Get access without a user.

Tony Ju
  • 14,891
  • 3
  • 17
  • 31
  • I have the same issue as the OP, except I'm using the dotnet core daemon template project. I already have Application permissions for Calendars.Read and Calendars.ReadWrite. Granted admin consent already. Template project works correctly for the default call to get user info, but when I try to get events with this call it fails: https://graph.microsoft.com/v1.0/users/{my-user-id}/calendar/events. Failure response is ResourceNotFound "Resource could not be discovered". – jay-danger Jun 08 '20 at 19:04