sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Set-SPOSiteScript: Issue with triggerflow URL : Invalid URL when using newer environment.api.powerplatform.com format

Open SAgnihotri200895 opened this issue 6 months ago β€’ 19 comments

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

None

Developer environment

None

What browser(s) / client(s) have you tested

  • [ ] πŸ’₯ Internet Explorer
  • [x] πŸ’₯ Microsoft Edge
  • [x] πŸ’₯ Google Chrome
  • [x] πŸ’₯ FireFox
  • [ ] πŸ’₯ Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [ ] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

We are encountering an issue with the Power Automate HTTP request trigger (when a webhook is received). Specifically, the validation of the webhook URL fails when the flow is saved in one of our environments. The URL format for the webhook has changed, and the newer URL structure is being rejected by Set-SPOSiteScript.

Describe the bug / error

In our Power Automate environment, we have 4 different environments. For most of these environments (3 out of 4), the webhook URLs are generated in the following format:

https://prod-xx.japaneast.logic.azure.com:443/workflows/{id}/triggers/manual/paths/invoke?...&sig={signature}

However, for one specific environment (and all new environments), the generated URL format is as follows:

https://defaultxxxxxxxx.environment.api.powerplatform.com:443/powerautomate/automations/direct/workflows/{id}/triggers/manual/paths/invoke/?api-version=1&tenantId=...&environmentName=...

When trying to use Set-SPOSiteScript, the URL is reported as invalid. The same URL works correctly in Postman and can trigger the flow successfully. The error suggests that the URL cannot be processed because of its format or content. Problem:

The newer URL structure (environment.api.powerplatform.com) works fine in Postman, but fails during validation in Power Automate when trying to configure the script.

The validation error seems to be occurring due to the different format (OAuth-secured) of the new webhook URL.

Older environments use the prod-logic.azure.com URL format, which works fine without requiring OAuth.

Steps to reproduce

Create a flow in Power Automate in a new environment.

Add a trigger as when http request is received, Save the flow and retrieve the webhook URL.

Attempt to use the Set-SPOSiteScript with the generated webhook URL.

Encounter the validation error.

Expected behavior

The URL should be accepted by Set-SPOSiteScript, as it works fine in external systems like Postman.

SAgnihotri200895 avatar Aug 08 '25 08:08 SAgnihotri200895

Hello @SAgnihotri200895, Thank you for bringing this issue to our attention. We will look into it and get back to you shortly.

Ashlesha-MSFT avatar Aug 08 '25 10:08 Ashlesha-MSFT

@SAgnihotri200895, We were able to reproduce the issue, and we are investigating it. We have logged this as a bug, and our engineering team will look into it. Thank you!

Ashlesha-MSFT avatar Aug 11 '25 04:08 Ashlesha-MSFT

Is there any news about this error because of this morning, I have received an email from microsoft telling us that as of the 30th of november, all flow using the ".logic.azure.com:443/workflows/" will be deprecated.

The main issues reside in the fact that the acceptable parameter in the SharePoint rest api hasn't been udapted to accomadate the new type url. Many of my site script are now failing because of it. Have we a timeline of when it will be fixed?

GC-jpellerin avatar Sep 02 '25 14:09 GC-jpellerin

Any update on if this will be resolved by Nov 30? @Ashlesha-MSFT

EddieDL avatar Sep 18 '25 02:09 EddieDL

Yeah, we also have critical flows that will stop working if we cannot move the sharepoint webhook to the new URLS

benjagroup avatar Sep 18 '25 11:09 benjagroup

We have a similar (possibly related) issue where the new URL does not seem to allow for path parameters.

cbapexjason avatar Sep 19 '25 17:09 cbapexjason

any updates? Meanwhile, the new URLs are also being generated on older environments for the HTTP request trigger

CoktaiiL avatar Sep 25 '25 04:09 CoktaiiL

Just adding us to the list of concerned users. Update of the URL is critical to ensuring continued use of SharePoint functions (via flows) after Nov. 30th. Thanks!

StephenBoydSG avatar Sep 25 '25 20:09 StephenBoydSG

For anyone who is currently blocked by this, it looks like Azure Logic Apps are still using the logic.azure.com urls. Not sure if they are going to be updated as well, but a workaround for the current issue might be to use a logic app as a temporary proxy (or replacement) for the Power Automate Flows.

pdl5p avatar Sep 28 '25 23:09 pdl5p

I have raised a ticket with microsoft. The solution is being worked on as we speak.

GC-jpellerin avatar Sep 29 '25 13:09 GC-jpellerin

I have raised a ticket with microsoft. The solution is being worked on as we speak.

Did you manage to get an update on this?

Tobajoseph-git avatar Oct 07 '25 15:10 Tobajoseph-git

I have raised a ticket with microsoft. The solution is being worked on as we speak.

Did you manage to get an update on this?

Yes, as I said, there are actively working on a patch. It should be propagated on the 15th of October (If everything goes well)

GC-jpellerin avatar Oct 07 '25 15:10 GC-jpellerin

Issue persists on latest versions of SPO and PnP modules.

Callum-Munro avatar Oct 17 '25 11:10 Callum-Munro

Several critical flows depend on this change and will stop functioning if we don’t update the Site Script to the new URLs.any update on this?

umashankar-padhan avatar Oct 23 '25 06:10 umashankar-padhan

I’m experiencing the same issue across several client workflows β€” these URLs are set to stop working on November 30. Is there any additional information or update on this deprecation?

carlgar512 avatar Oct 23 '25 11:10 carlgar512

I’m experiencing the same issue across several client workflows β€” these URLs are set to stop working on November 30. Is there any additional information or update on this deprecation?

@GC-jpellerin Do we have any news on this?

carlgar512 avatar Oct 28 '25 08:10 carlgar512

It is working again through the Sharepoint API. I'm testing the trigger with different type of permission as we speak.

GC-jpellerin avatar Oct 28 '25 15:10 GC-jpellerin

It is working again through the Sharepoint API. I'm testing the trigger with different type of permission as we speak.

yes, its working for me as well, need more testing though

SAgnihotri200895 avatar Oct 28 '25 15:10 SAgnihotri200895

Can also confirm this is now working using PnP Powershell

Callum-Munro avatar Nov 05 '25 09:11 Callum-Munro