Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ALM Accelerator - BUG]: Could not find connection '<GUID>' for API 'shared_office365' #6586

Closed
dspencelink opened this issue Sep 12, 2023 · 6 comments
Assignees
Labels
alm-accelerator ALM Accelerator Components and Apps bug Something isn't working

Comments

@dspencelink
Copy link

dspencelink commented Sep 12, 2023

Describe the issue

This issue has stumped me for days. We have a Solution with a flow, a power app, 4 environment variables and 4 connection references. I use ALM Accelerator to commit the solution to Azure DevOps, then when I try to deploy to QA environment, the step named 'Import Managed Solution as Update' fails every time. If I enable debugging on the pipeline, this is the error:

Microsoft.Xrm.Sdk.InvalidPluginExecutionException: Request failed with: NotFound and error: {"error":{"code":"ConnectionNotFound","message":"Could not find connection '8718b22cd7cd4273aeaf3ce8b8acffc7' for API 'shared_office365'."}} and request url https://api.powerapps.com/providers/Microsoft.PowerApps/scopes/service/apis/shared_office365/connections/8718b22cd7cd4273aeaf3ce8b8acffc7?api-version=2018-10-01&amp;%24expand=permissions(%24filter%3dmaxAssignedTo('d161b18f-af4e-44f0-abd2-067d13b5c6ee')&amp;%24filter=environment+eq+'c14c9f13-5908-eecf-9002-bb5ee724a811'

If I run Get-AdminPowerAppConnection in powershell, I can find that connection ID in our Prod environnment (I'm deploying to QA). If I check the connections I can see in Prod, I don't see one with this GUID. It's almost like it's a ghost connection or something?

ConnectionName : 8718b22cd7cd4273aeaf3ce8b8acffc7
ConnectionId : /providers/Microsoft.PowerApps/scopes/admin/environments/ProdGUID/apis/shared_office365/connections/8718b22cd7cd4273aeaf3ce8b8acffc7
FullConnectorName : /providers/Microsoft.PowerApps/scopes/admin/environments/ProdGUID/apis/shared_office365
ConnectorName : shared_office365
DisplayName : PowerAutomate@liprop.com
CreatedTime : 2023-07-25T14:38:06.5419228Z
CreatedBy : @{id=IDGUID; displayName=My Service Account; email=svc Account email; type=User;
tenantId=; userPrincipalName=svc account UPN}
LastModifiedTime : 2023-09-12T20:26:51.8655704Z
EnvironmentName : ProdGUID
Statuses : {@{status=Connected}}

I reviewed the connections on the flow and in the deploymentSettings.json in DevOps and they match 1-to-1 plus they have different names than the displayname for the ghost connection. How do I find where this ghost connection is located and how do I get it out of the Solution so I can import it properly to QA? Thanks.

image

Expected Behavior

I'm able to deploy other solutions to QA, just this one is giving me fits. I should be able to deploy to QA and prod.

What component are you experiencing the issue with?

ALM Accelerator Canvas App

What solution version are you using?

1.0.20230802.1

Steps To Reproduce

  1. Create solution
  2. Add flows, apps and connection references
  3. Test migrating to a different environment

Anything else?

No response

AB#1382

@dspencelink dspencelink added alm-accelerator ALM Accelerator Components and Apps bug Something isn't working labels Sep 12, 2023
@RajeevPentyala RajeevPentyala self-assigned this Sep 13, 2023
@RajeevPentyala
Copy link
Collaborator

@dspencelink You might want to check your 'deploy-QA-' pipeline's variables for the GUID.
image

@dspencelink
Copy link
Author

@dspencelink You might want to check your 'deploy-QA-' pipeline's variables for the GUID. image

Thanks. I see that ID listed there as a connection reference for a flow in the solution and the reference is shared with other solutions. I had the developer remove that connection reference and create a new one just for this solution. I manually removed the variables, reran deployment settings, recommitted, then it errored with an ID of a different connection reference which was also shared. I had him remove that one also and create a new one and update the flow actions to use the new connection. I manually removed that variable, reran deployment settings, recommitted and now it's erroring with the same ID I started this issue with.... If I view the dependencies on that connection reference, it shows it's only used with the flow in the solution. I'm confused how this ID got reused and how to get past it. The pipeline debug doesn't help resolve the issue. I'm stuck.
image

@dspencelink
Copy link
Author

The connection reference shows connected fine in deployment settings but it still errors out:

image

@dspencelink
Copy link
Author

In the Deployment settings window, I clicked the plus sign next to the failing ID and created a new connection but then it just errors out on the new connection ID. I've tried this several times, I've tried sharing and not sharing. I'm stumped. I've asked the developer to create a new solution and move the app to it and create new connections. I don't have any other ideas...

image

@dspencelink
Copy link
Author

dspencelink commented Sep 15, 2023

Hot diggity dog! I finally figured it out! I finally noticed that the Connection Pre-check was querying for a connection ID that existed in Prod but not in QA but the query was looking for that ID in QA environment (which didn't exist obviously). In the ALM Accelerator for Admins app, I had renamed the default deployment steps of Validation --> Test --> Prod to be named 'Test --> QA --> Prod' to reflect our naming standards. I had also updated the 'EnvironmentName' of the Test environment to be QA so it showed QA everywhere I could find and in all variables. There must be something hardcoded in the deployment steps where it didn't like that so renaming back to the default fixed the issue.

image

@CoEStarterKitBot
Copy link
Collaborator

@dspencelink This has been fixed in the latest release. Please install the latest version of the toolkit following the instructions for installing updates. Note that if you do not remove the unmanaged layers as described there you will not receive updates from us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alm-accelerator ALM Accelerator Components and Apps bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants