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 Pages / How to use cript to re...
Power Pages
Suggested Answer

How to use cript to registered cloud flow in CI/CD script

(1) ShareShare
ReportReport
Posted on by 10
The official documentation mentions that Cloud Flows should be registered  by powerpages in ALM process.
In my current setup, the Cloud Flow itself is already activated on the Power Automate side. However, after deploying Power Pages, This cloud flow still needs to be manually registered on PowerPages.
I would like to understand whether there is a supported way to perform this “activation” step for Power Pages Cloud Flows directly within a CI/CD script (for example via API, Dataverse, or CLI), instead of relying on manual interaction through the Power Pages .
Has anyone successfully implemented this as part of an automated deployment pipeline? Any guidance or best practices would be appreciated.
 
 

 

Application Lifecycle Management (ALM) for Cloud flows

When you move Power Pages site components that include cloud flows from one environment to another, the cloud flows must be registered in the target environment. If you don't register the cloud flows, invoking them from the website results in a forbidden error.

To register the flow with the target environment, follow these steps:

  1. Sign into Power Pages and select the target environment.

  2. Locate the site and select Edit.

  3. Go to the Set up workspace, then select Cloud flows under Integrations.

  4. Within the Cloud flows in this site list, look for the register button.

    :::image type="content" source="media/cloud-flow/register-button.png" alt-text="Screenshot of the register button in the Cloud flows in this site list.":::

  5. To register the flow, select the icon.

Categories:
I have the same question (0)
  • Suggested answer
    oliver.rodrigues Profile Picture
    9,465 Most Valuable Professional on at
    I find it extremely painful to use Cloud Flow with Power Pages. I haven't yet, but going forward I am planning to leverage more the new Server-Logic since it's gone GA recently: Power Pages server logic overview | Microsoft Learn
     
    But anyway, back to your main question, the way that I have resolved this was by introducing a PowerShell script to my ALM pipelines that will push the SiteComponent record with the JSON 
     
    It wasn't an easy setup, I only recommend if you are really trying to achieve a full CI/CD in your project, otherwise I'd recommend manually registering the Flow
     
    Microsoft is constantly improving the ALM process with Cloud Flows, and now we also have Server-Logic. 
     
    Let me know if you need to setup this PowerShell script and I am happy to help if needed
  • 11manish Profile Picture
    1,381 on at
    Cloud Flows with Power Pages currently require a manual registration step, which is not fully supported in CI/CD pipelines.
     
    While it is possible to automate this by pushing SiteComponent records via PowerShell (effectively simulating the registration), this approach is not officially supported and may introduce maintenance risks.
     
    For most implementations, it is recommended to either include manual registration as part of the deployment process or move towards using Power Pages Server Logic, which provides a more ALM-friendly and native approach without requiring flow registration.
  • CU08010919-1 Profile Picture
    10 on at

    Thank you very much for your reply.

    Just to make sure I understand correctly: do you mean that this requires directly modifying powerpagecomponent.xml inside the solution?

    If so, that does seem quite cumbersome and risky to maintain, especially in a CI/CD scenario.

    I couldn't find any information for this, I would really appreciate your help with setting up this PowerShell script. 
  • Suggested answer
    oliver.rodrigues Profile Picture
    9,465 Most Valuable Professional on at
    No, the PowerShell script won't change the solution xml, it will create/update Site Component records in the target environment
     
    It's not clear if this is a supported solution or not, potentially not, however it's just a workaround I found to get it working
     
    Are you using DevOps pipelines or is this Power Platform Pipelines? if the latter, this solution probably won't work at all 
  • CU08010919-1 Profile Picture
    10 on at
    I am currently using a PowerShell script by GitHub Actions.
  • Suggested answer
    Valantis Profile Picture
    3,408 on at
     
    GitHub Actions works fine for this. The approach is to use PowerShell with the Dataverse Web API to create or update the powerpagecomponent record that represents the flow registration.
     
    script needs to do:
     
    1. Authenticate to the target environment (use a service principal with client credentials)
    2. Get the workflow record from Dataverse to retrieve the flow's trigger URL:
       GET /api/data/v9.2/workflows?$filter=name eq 'YourFlowName'
    3. Get the existing powerpagecomponent record for the flow in that site
    4. PATCH the Content field of that record with the updated JSON containing the new environment's trigger URL (the adx_flowtriggerurl value changes per environment after deployment)
     
    The Content JSON on the powerpagecomponent record contains the environment-specific trigger URL that Power Pages uses to invoke the flow. That URL regenerates when the flow is deployed to a new environment, which is why the manual registration step exists. It rewrites that URL.
     
    For GitHub Actions, the authentication piece looks like this in PowerShell:
     
    ```powershell
    $tokenResponse = Invoke-RestMethod -Method Post `
      -Uri "https://login.microsoftonline.com/$tenantId/oauth2/v2.0/token" `
      -Body @{
        grant_type    = "client_credentials"
        client_id     = $clientId
        client_secret = $clientSecret
        scope         = "$environmentUrl/.default"
      }
    $token = $tokenResponse.access_token
    ```
    Then use that token as a Bearer header for your Dataverse API calls.
     
    Just to set expectations: this is not an officially supported path from Microsoft. It works but if Microsoft changes the powerpagecomponent schema it could break. Oliver's offer to share the full script is worth taking up. The exact JSON structure of the Content field is the tricky part.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 61

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 40 Most Valuable Professional

#3
DP_Prabh Profile Picture

DP_Prabh 26

Last 30 days Overall leaderboard