Aug 05 2022 05:15 AM
We have an oncall rotation and keep track of it using Microsoft Teams Shift.
I am trying to create a powershell script to update a distribution list so that whoever is on call gets notified if there is an issue.
My logic is a scheduled task that runs once a day to get who is scheduled for a shift (on call) and then updates a office 365 distribution list. That way if there is an issue, only the people that are oncall get the email notification.
Updating the distro is really easy, but I am struggling getting the shift info from teams.
Using Get-MgTeamScheduleShift to list the shifts, but its not black and white - looks like the userID I have to get from Get-MgUser - I am not sure how to get the actual shift data though.
Please help!
Aug 08 2022 12:49 AM
Aug 09 2022 03:54 AM