问题
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.
- 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.)
- 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