Skip to content

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

@SAgnihotri200895

Description

@SAgnihotri200895

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
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 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.

Metadata

Metadata

Assignees

Labels

area:powerautomateCategory: Power Automate / Flowsharepoint-developer-supportsharepoint-developer-supporttype:bug-confirmedConfirmed bug, not working as designed / expected.type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions