ms Graph api, calendarView 403-accessdenied error

牧云@^-^@ 提交于 2021-02-04 08:29:05

问题


First, I'm using Spring, Jetty, Retrofit.

When I use calendarView in local, they return the successful values successfully.

But, When others connect to my local server and call this api, it always returns me 403-AccessDenied error. (additionally, When they call another ms api, they return the successful values.)

I think I have set all the recommended permissions in Graph api. But this could be my illusion.

In order for someone else to call api from my local server, what should I do?

Or Am I missing anything on this matter?

These are my permissions.

"openid",
"offline_access",
"profile",
"User.ReadWrite",
"Mail.ReadWrite",
"Calendars.ReadWrite",
"User.ReadBasic.All",
"BookingsAppointment.ReadWrite.All"

This is my azure info.

enter image description here

And I'm using this calendar view api(https://docs.microsoft.com/en-us/graph/api/calendar-list-calendarview?view=graph-rest-1.0&tabs=http)

And Using This URL in my code(in this case, I'm using batch request)

GET | "/users/"+getAddress()+"/calendarView?startDateTime="+getStartTime()+"&endDateTime="+getEndTime()

回答1:


Based on your description, other users are trying to access the calendarView of the user "{Room}".

In this case, you need 2 more configurations.

  1. User "{Room}" gives mailbox permissions "Full Access" to other users in Office 365. See Use the EAC to assign permissions to individual mailboxes. (you should be able to find the room under Resources. And the process can take up to hours for the changes to propagate through the system and be in effect.)
  2. Add one more delegated permission: Calendars.ReadWrite.Shared into the app registed in Azure AD.


来源:https://stackoverflow.com/questions/59153936/ms-graph-api-calendarview-403-accessdenied-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!