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 about back end.
For example, could I export the clocked-schedule for entire company (500+ staffs in same domain)? I can only export my team's clocked schedule.
Also could I create schedule for entire company?
- 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
3 Replies
- 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_365Copper 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- If 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.