microsoft-graph-explorer-v4
microsoft-graph-explorer-v4 copied to clipboard
CalendarView returning 403 even though consented
Describe the bug When accessing https://graph.microsoft.com/v1.0/me/calendar/calendarView?startDateTime=2023-01-01&endDateTime=2023-01-26 from https://developer.microsoft.com/en-us/graph/graph-explorer the returned output is "Forbidden - 403 - 200ms. Either the signed-in user does not have sufficient privileges, or you need to consent to one of the permissions on the Modify permissions tab"
In the Modify permissions tab Calendars.Read and Calendars.ReadWrite are consentet.
If using the Get-MgUserCalendarView to access my own calendar the result is as expected. Accessing any other user in our tenant yields the same "Access is denied" result as from the Graph developer website.
To Reproduce Steps to reproduce the behavior:
- Go to 'https://developer.microsoft.com/en-us/graph/graph-explorer'
- Insert 'https://graph.microsoft.com/v1.0/me/calendar/calendarView?startDateTime=2023-01-01&endDateTime=2023-01-26' into the Query window and press 'Run query'
- See output in 'Response preview'
Expected behavior It is expected that the output is a view of all calendar events in the given timeframe.
Screenshots
Microsoft Graph website
Powershell Module (Get-MgUserCalendarView)
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Chrome 109.0.5414.120
Hey @ViKunneJoKaldeHamPalle. I have tested this endpoint and it's working for my tenant. It seems your tenant admin has restricted delegated access to the calendar information for client applications. You can try the endpoint with different credentials for a different tenant to see if the issue persists. Also, confirm with your tenant admin if there is restricted access to the calendar resources.
Let me know if this helps
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Hi @Onokaev Thanks for the reply and sorry for not getting back earlier.
You might be right with regards to an admin in my tenant. Do you know where this setting is set in the tenant? Just so I know where to look (and possibly, who to blame :P)
Hey @ViKunneJoKaldeHamPalle. Follow these steps to check:
-
Log in to Azure portal
-
Select Azure Active Directory > Enterprise applications > Consent and permissions > User consent settings.
-
Check if there are restrictions on the User Consent settings tab
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
User consent for applications is set to Allow user consent for apps
Group owner consent for apps accessing data is set to Allow group owner consent for all group owners
Can a setting via Powershell limit Graph functionality?
Hey @ViKunneJoKaldeHamPalle. We are still investigating this issue. I'll get back to you soon. Also, could you confirm if you are experiencing this issue with a different tenant?
I had no problem in a test tenant.