Microsoft Shifts for Teams Power Automate Errors

%3CLINGO-SUB%20id%3D%22lingo-sub-1603606%22%20slang%3D%22en-US%22%3EMicrosoft%20Shifts%20for%20Teams%20Power%20Automate%20Errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1603606%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20been%20looking%20into%20the%20Shifts%20(Preview)%20connector%20in%20Power%20Automate%20to%20approve%20open%20shift%20requests.%20I've%20managed%20to%20get%20the%20templates%20from%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FOfficeDev%2FMicrosoft-Teams-Shifts-Power-Automate-Templates%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FOfficeDev%2FMicrosoft-Teams-Shifts-Power-Automate-Templates%3C%2FA%3E%26nbsp%3Bbut%20I'm%20having%20issues.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEvery%20time%20the%20flow%20runs%2C%20it%20fails%20with%20a%20%22Forbidden%22%20message%20on%20each%20Open%20Shift%20Request%2C%20and%20a%20full%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%7B%22error%22%3A%7B%22code%22%3A%22Forbidden%22%2C%22message%22%3A%22This%20shift%20request%20is%20not%20in%20a%20state%20to%20be%20approved.%22%2C%22details%22%3A%5B%5D%2C%22innererror%22%3A%7B%22code%22%3A%22ShiftRequestsCannotBeActedUpon%22%7D%7D%7D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can't%20find%20any%20useful%20links%20online.%20I%20have%20access%20to%20approve%20requests%20in%20the%20app.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20have%20any%20ideas%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAndrew%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1619675%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Shifts%20for%20Teams%20Power%20Automate%20Errors%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1619675%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F614228%22%20target%3D%22_blank%22%3E%40acartwright1986%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20you%20send%20a%20screenshot%20of%20the%20step%20that%20fails%20within%20the%20run%20please%3F%20I%20would%20say%20it%20is%20a%20permissions%20issue%20but%20as%20for%20where%2C%20would%20need%20to%20know%20more.%20In%20my%20setup%20I%20did%20the%20offer%20request%20but%20should%20be%20similar.%20However%20I%20did%20setup%20the%20flow%20as%20global%20admin%20and%20the%20Shifts%20for%20Teams%20connections%20were%20setup%20with%20the%20same%20account%20and%20I%20then%20setup%20a%20Team%20as%20a%20demo%20account%2C%20associated%20Shifts%20with%20it%2C%20created%20Shift%2C%20offered%20up%20that%20shift%20and%20the%20flow%20executed%20without%20issue.%3CBR%20%2F%3E%3CBR%20%2F%3ESo%20if%20you%20could%20advise%20in%20terms%20of%20the%20account%20that%20the%20flow%20is%20running%20under%2C%20the%20account%20used%20for%20the%20connections%20used%20for%20the%20Shifts%20flow%20actions%2C%20accounts%20that%20are%20owners%20and%20members%20of%20the%20Team%20associated%20with%20the%20shift%20in%20relation%20to%20the%20example%20request%20you%20are%20doing.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHenry%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hi all

 

I've been looking into the Shifts (Preview) connector in Power Automate to approve open shift requests. I've managed to get the templates from https://github.com/OfficeDev/Microsoft-Teams-Shifts-Power-Automate-Templates but I'm having issues.

 

Every time the flow runs, it fails with a "Forbidden" message on each Open Shift Request, and a full error:

 

{"error":{"code":"Forbidden","message":"This shift request is not in a state to be approved.","details":[],"innererror":{"code":"ShiftRequestsCannotBeActedUpon"}}}

 

I can't find any useful links online. I have access to approve requests in the app.

 

Does anyone have any ideas? 

 

Thanks

 

Andrew

1 Reply
Highlighted

Hi @acartwright1986 ,

 

Could you send a screenshot of the step that fails within the run please? I would say it is a permissions issue but as for where, would need to know more. In my setup I did the offer request but should be similar. However I did setup the flow as global admin and the Shifts for Teams connections were setup with the same account and I then setup a Team as a demo account, associated Shifts with it, created Shift, offered up that shift and the flow executed without issue.

So if you could advise in terms of the account that the flow is running under, the account used for the connections used for the Shifts flow actions, accounts that are owners and members of the Team associated with the shift in relation to the example request you are doing.

 

Thanks

 

Henry