SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.25k stars 1.01k forks source link

New trigger authentication options break this process in Power Automate #9396

Open joshtransient opened 11 months ago

joshtransient commented 11 months ago

Since the introduction of the Who can trigger the flow? option in the "When a HTTP request is received" trigger, the site script action to trigger a flow now fails every time.

When "Anyone" is chosen, the error message is "The request must be authenticated only by Shared Access scheme." When "Any user in my tenant" is chosen, the error message is "The OAuth authorization scheme is required. Please add authentication scheme and try again."

This is only broken when using Power Automate. The HTTP request trigger in Logic Apps does not have the Who can trigger the flow? option (yet), and still works just fine.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ghost commented 11 months ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

joshtransient commented 11 months ago

Update: the functionality is not expressly broken. However... 1) When selecting the When a HTTP request is received trigger in the Power Automate designer, the default value of Who can trigger the flow is "Any user in my tenant" 2) When the value of Who can trigger the flow is changed to "Anyone", the HTTP POST URL value in the trigger is updated. Since that field shows as a single line of text in the Power Automate designer, I wasn't aware that additional query parameters were added.

Ensuring that I have the correct HTTP POST URL in my site script with the additional query params makes this work. However, I'd still highly recommend that this doc be updated with a note to tell folks to change the Who can trigger the flow value first, then copy the HTTP POST URL value.