Forum Discussion
Mark_365
May 07, 2021Copper Contributor
Back end management tool for Shift?
We are now testing Shift in a small team. We need our staffs clock-in/clock-out and make a record every working day. Shift is working as expected. However I cannot find any function, API or document...
- May 07, 2021There's a set of Shift endpoints as part of the Graph API: https://docs.microsoft.com/en-us/graph/api/schedule-list-shifts?view=graph-rest-1.0&tabs=http
VasilMichev
May 07, 2021MVP
There's a set of Shift endpoints as part of the Graph API: https://docs.microsoft.com/en-us/graph/api/schedule-list-shifts?view=graph-rest-1.0&tabs=http
- Mark_365May 12, 2021Copper ContributorDear Vasil,
Do you know what kind of permission is required for this API? The document mentioned [Application Schedule.Read.All, Schedule.ReadWrite.All].
I checked my API permission have both of them. I checked against JWT token and confirmed I have the permission.
However when I called
Invoke-RestMethod -Uri "https://graph.microsoft.com/v1.0/teams/$TeamId/schedule/shifts" -Headers $Headers
it returns 403 error.
It works if I called:
Invoke-RestMethod -Uri "https://graph.microsoft.com/v1.0/teams/$TeamId" -Headers $Headers- VasilMichevMay 12, 2021MVPIf you are running in the delegate permissions model, try making the account an owner of the given team. if you need to cover all teams in the company, best run it via application permissions.