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 Automate / Deploying solution wit...
Power Automate
Suggested Answer

Deploying solution with pipelines

(2) ShareShare
ReportReport
Posted on by 21
I have a solution with 2 apps, 6 flows and 2 connection references and when I try to deploy using pipelines from DEV to TST, the connections are not there, and neither is any user the apps are shared with. The flows are always off and I get:
Turn on failed. Flow client error returned with status code "Forbidden" and details "{"error":{"code":"ConnectionAuthorizationFailed","message":"The caller object id is '4d679c53-ca50-410d-9c65-74b148b8c224'. Connection 'citram_sharedsharepointonline_3e569' to 'shared_sharepointonline' cannot be used to activate this flow, either because this is not a valid connection or because it is not a connection you have access permission for. Either replace the connection with a valid connection you can access or have the connection owner activate the flow, so the connection is shared with you in the context of this flow."}}".
 
I deleted the solution in TST and exported/imported it back and now I get:
Turn on failed. Flow client error returned with status code "BadRequest" and details "{"error":{"code":"InvalidOpenApiFlow","message":"Flow save failed with code 'MultipleErrorsOccurred' and message 'The dynamic operation request to API 'sharepointonline' operation 'GetTable' failed with status code 'NotFound'. This may indicate invalid input parameters. Error response: {\r\n \"status\": 404,\r\n \"message\": \"List not found\\r\\nclientRequestId: d3add3c3-9585-434c-bd2d-6d5032c99dc1\\r\\nserviceRequestId: 5d1918a2-7045-d000-57cc-2eda05300fcf\"\r\n};The dynamic operation request to API 'sharepointonline' operation 'GetTable' failed with status code 'NotFound'. This may indicate invalid input parameters. Error response: {\r\n \"status\": 404,\r\n \"message\": \"List not found\\r\\nclientRequestId: d3add3c3-9585-434c-bd2d-6d5032c99dc1\\r\\nserviceRequestId: 5d1918a2-5046-d000-57cc-284b8c0e4f5e\"\r\n}'."}}".
 
I have no clue why the connections are not coming through. I have updated all the environment variables and made sure the connections are checked green before I deploy, but still nothing. I do not want update anything through the default environment since I don't want unmanaged layers. Is there something I need to do that I have not? 
Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    3,038 on at
    Your issue is not caused by pipelines themselves — it’s caused by:
    • connection references not being rebound to valid TST connections,
    • SharePoint list metadata/GUID mismatches,
    • and expected Power Platform ALM behavior where connections and sharing permissions do not migrate automatically.
    The clean enterprise approach is:
    • One logical connection reference per connector
    • Environment variables for URLs/list names
    • Precreated resources in each environment
    • Rebind connections during deployment
    • Never edit managed flows after import to avoid unmanaged layers
  • Suggested answer
    RaghavMishra Profile Picture
    216 on at

    Hi,

    Both errors are classic post-pipeline symptoms, and the fix is on the target environment side, not the solution itself. Working through them:

    Error 1 — ConnectionAuthorizationFailed when turning on the flow

    The green check in the pipeline UI confirms a connection of that connector type exists in TEST — it does not confirm the deploying identity is the owner of that connection or has it shared in the "context of this flow." When the pipeline service activates the flow, it activates it as the deploying user, and that user must own (or be granted use of) the connection that the connection reference is bound to.

    1. In TEST, sign in as the same identity that runs the pipeline.
    2. Go to Power Automate → Data → Connections and confirm a SharePoint connection exists, owned by that identity.
    3. Open the solution in TEST → the SharePoint connection reference → ensure it's bound to that connection, not to one owned by someone else.
    4. Re-run "Turn on" on the flow. Reference: Manage connections in pipelines and Use connection references and environment variables in pipelines.

    Error 2 — InvalidOpenApiFlow / "List not found" (404)

    This means at least one of the flows still has the DEV SharePoint Site Address and/or List ID hard-coded in its action JSON. Connection references swap the authentication, but they don't rewrite a hard-coded list GUID — that's what environment variables are for.

    1. In DEV, create two environment variables in the solution: one of type SharePoint Site (Data source) and one of type SharePoint List (Data source). Microsoft added these data-source types specifically for this scenario. See Manage SharePoint sites and lists with environment variables.
    2. Open each flow's SharePoint action and re-pick Site AddressEnter custom value → select the environment variable. Do the same for List Name.
    3. Re-export, re-import via the pipeline, and supply the TEST site/list values during deploy (or set them as Current Value in TEST after import — but ideally at deploy-time so there's no unmanaged layer).
    4. Reference: Environment variables overview.

    What pipelines do not carry across — re-apply per environment

    Avoiding unmanaged layers

    The supported way to set TEST-specific values without creating an unmanaged layer is to set Current Value on environment variables during the pipeline deploy step (the pipeline prompts for them), or use a Deployment Settings file committed alongside the solution. Editing the imported managed solution components directly in TEST is what produces unmanaged layers — avoid that. Reference: Pre-populate connection references and environment variables for automated deployments.

    Run order I'd suggest: (1) fix the connection ownership in TEST and re-turn-on one flow to confirm Error 1 clears, (2) parameterize the SharePoint site/list with environment variables in DEV, (3) re-deploy with the deployment settings populated for TEST.

    Found this helpful? Please mark ✅ "Does this answer your question?" so others searching for the same issue can find it quickly. A 👍 on "Was this reply helpful?" or a ♥ Like is also much appreciated!

    Raghav Mishra — LinkedIn | PowerAI Labs

  • DB-22041341-0 Profile Picture
    21 on at
    I have environmental variables for my SharePoint lists, SharePoint Library, Canvas App URLs, and 365 Outlook recipients. I also only have 2 connection references for the SharePoint site and Outlook 365, so I am only using those in the canvas apps and flows. When I go through the pipelines I have remapped them to Test environment URLs when looking at the variables and reference connections.
     
    I am doing all the pipeline working with the service account that has access in all environments (Dev, Test, Prod), so this is why I am wondering why the connections are not coming over. As for the sharing of the apps and lists I can do that in Test, so this I assume this will not create an unmanaged layer?
     
    Should I create the connection references and environmental variables in Test before I deploy? If I do this can I just select them when I get the choice to re-direct the connection references and environmental variables?
     
    I have checked the 2 canvas apps and 6 flows to make use they are all using the right variables and they appear to be, but is there some obscure place I should be checking?
  • Suggested answer
    Valantis Profile Picture
    6,526 on at
     
    No need to pre-create connection references in TST. Just make sure the service account has an active SharePoint and Outlook connection created in TST before deploying. The pipeline will let you select them during deployment.

    Sharing apps in TST is fine and won't create unmanaged layers.
    For the List not found error: check each SharePoint action using Peek Code (three dots on the action). If you see a hardcoded list GUID or name in the JSON instead of an environment variable reference, that's your problem. Also check your SharePoint triggers  those often get missed.
     

     

    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

  • Valantis Profile Picture
    6,526 on at

    Hi @DB-22041341-0,

    Just wanted to check in and see if everything is working now. If you still need any help, feel free to let me know.

    Also, if the issue is resolved, it would be great if you could mark the answer as solved so others with the same question can find it easily.

     

    Thanks and have a great day!

     
  • DB-22041341-0 Profile Picture
    21 on at
    Thank you all on this post. Pieces of each of the comments have helped me get farther. All my flows are on and seem to be working but I am now having an issue with a combo box and not getting the values from another list that I have as a GUID in the environmental variables. One of my apps is submitting fine but the other one is saying Network error and Patch not working. But all the messages that I am using the patch function with (locking and unlocking the record) are all appearing on the screen. For the network error, it says to view the error but I have no clue where to view it from. I tried the Live Monitor and ran the app in there but nothing comes up for it. Not sure how to find the error.
  • Suggested answer
    Valantis Profile Picture
    6,526 on at
     
    Good progress! For the two remaining issues:
     
    1. Network error on Patch: the Live Monitor should capture this. Make sure you start the Monitor session first, then open the app from the Monitor link (not the normal app link). The Patch error will show up as a red row in Monitor under the network requests. Click on it to see the full error response body which will tell you exactly what's failing.
     
    If Monitor shows nothing, add a Notify(FirstError.Message) right after the Patch call to surface the error on screen:
    Patch('YourList', ...);
    Notify(FirstError.Message, NotificationType.Error)
     
    2. Combobox not getting values from the list GUID in environment variables: the environment variable stores the GUID as text, but SharePoint lookup columns and list references need the list to be referenced by its actual name or URL, not just its GUID. Check how your combobox Items property is using the environment variable.
    If it's trying to filter or reference a list using the GUID directly, that likely won't work SharePoint connector actions expect the list display name or internal name, not the GUID.
     
    What does your combobox Items formula look like?
     

     

    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

  • DB-22041341-0 Profile Picture
    21 on at
    Morning , I don't think it is the GUID because I also use it for Attack Vector that is from another list and that one is working fine. And with the patching I am only using when the record is edited and moving the ID to the list and then wiping it when the user is done. The form's submit function is what is saving the all the data in the form itself. And when I run the app, I get all the "Record is locked" and "Record is unlocked" messages. I re-did the connection to the Agency list to see if that would do anything and re-deployed but still doesn't work. My combo box items: 
    Sort(Distinct(Agencies, 'Agency Name'), Value, SortOrder.Ascending). I have removed the solution and going to re-deploy it maybe that will make the right connections. Thank you again for all the help. I will post again once I finish with the deployment.
  • Suggested answer
    Valantis Profile Picture
    6,526 on at
     
    Looking at your combobox formula Sort(Distinct(Agencies, 'Agency Name'), Value, SortOrder.Ascending), this references the Agencies data source directly. The question is whether Agencies is connected to the correct SharePoint list in TST after deployment.

    Check: in the Canvas App editor in TST, go to Data sources and look at what the Agencies connection is pointing to. If it's pointing to the DEV SharePoint site or a different list name, that's why the combobox is empty.

    For the Patch network error: since the lock/unlock messages appear (meaning those Patches work), the failing Patch is the one in the form submit or the one saving the actual record fields. Add this right after the failing Patch to see the exact error:
    Notify(Concat(Errors('YourList'), Message & " "), NotificationType.Error)

    This is more specific than FirstError.Message as it shows all errors from the last Patch against that specific list.
     
    Also: since you're redeploying, after import make sure you open each Canvas App in the editor, go to Data sources, remove and re-add the Agencies and any other SharePoint connections so they point to the TST list URLs. Deployed managed apps sometimes carry stale connection references that need to be refreshed by reopening the data source in the target environment editor.
     

     

    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

  • Suggested answer
    RaghavMishra Profile Picture
    216 on at

    Hi there,

    Glad the pipeline pieces are sorted and your flows are on now. The two remaining items are both diagnosable - here's how I'd approach each.

    Combo box not returning all values

    Your formula uses Distinct, which is a non-delegable function. When a query can't be delegated, Power Apps only retrieves the first 500 records from the data source and then applies the function - so if your Agencies list has more than 500 items, the combo box will silently miss the values beyond that point (even though the same pattern works fine on a smaller list like Attack Vector).

    Two things to check and try:

    • In the formula bar, look for a blue delegation warning (wavy underline) on the Distinct part - that confirms the limit is in play.
    • Go to Settings → General → Data row limit and raise it from 500 toward 2,000. If your list is under 2,000 rows this will usually surface the missing values. Note this is a performance trade-off, so it's still best to keep result sets small where you can.

    (As a side note, Distinct returns a one-column table whose column is named Value - which is why Sort(..., Value, ...) is correct.)

    "Network error" / Patch not working - where to see the error

    Live Monitor is the right tool; the trick is that it only logs events that happen while it's connected, and you have to open the specific row to read the error. Steps:

    • For the published app: go to Apps, select the app, open the dropdown next to Details, choose Live monitor, then Play published app - the player and Monitor stay linked.
    • Reproduce the action that fails (trigger the Patch) with Monitor open. The network calls appear as rows.
    • Select the failing event row - the right-hand panel shows the HTTP status code and the actual error message (for example a 4xx/throttling response), which tells you exactly why the Patch is rejected.

    Since the lock/unlock messages all display but the Patch fails, the error detail in that selected Monitor row is what will pinpoint the cause (data type mismatch, a required field, or a connection/permission issue on the second app's connection).

    References:

    Found this helpful? Please mark ✅ "Does this answer your question?" so others searching for the same issue can find it quickly. A 👍 on "Was this reply helpful?" or a ♥ Like is also much appreciated!

    Raghav Mishra - LinkedIn | PowerAI Labs

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 462

#2
Vish WR Profile Picture

Vish WR 256

#3
David_MA Profile Picture

David_MA 242 Super User 2026 Season 1

Last 30 days Overall leaderboard