web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Shifts from Teams ...
Power Automate
Suggested Answer

Get Shifts from Teams Graph API call returns data inconsistent with UI data

(0) ShareShare
ReportReport
Posted on by
Hello!
 
Recently one of my flows that reads teams shifts for a given shift type has begun to malfunction. The flow fetches all shifts from my team, filters based on shift display name, then posts a message in our slack workspace notifying the user they are on shift.
 
This has worked well until today. Now, the first step of the flow, Get Shifts From Team, returns the incorrect user ID. When debugging, I found that no matter who I assign the shift to, even if I assign the shift to everyone on my team, the same user id is returned for every shift.
 
The only thing I had changed is added a scheduling group within the team, which I did not expect to have any impact, as the call does not look for scheduling group specifically. The call only looks for the top level team, which remains unchanged. The call still returns the correct # of shifts, but regardless of who I assign the shift to, the returned data from graph API call is incorrect.
 
It doesn't appear to be stale data, as the last updated dates are correct in the returned data. When I remove shift from all team members, the call properly returns no data, then re-adding he shift to any person in my team will return the same user ID.
 
The user ID retuned is not mine, but indeed a member of the correct team. The shift schedule is being shared each time.
 
Any ideas?
I have the same question (0)
  • Suggested answer
    Vish WR Profile Picture
    2,825 on at
     

    This could be due to adding Scheduling Groups in Teams Shifts the Graph response still returns shifts correctly, but the user mapping can get resolved incorrectly at the team-level endpoint.

     

    Instead of using  basic shifts call, use an expanded query so Graph returns full assignment details

    ex : GET https://graph.microsoft.com/v1.0/teams/{team-id}/schedule/shifts?$expand=sharedShift,draftShift

     

    Vishnu WR
     
    Please âœ… Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥



     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 862

#2
Valantis Profile Picture

Valantis 738

#3
Haque Profile Picture

Haque 553

Last 30 days Overall leaderboard