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

Sample schemas for UpdateConnectionReferences and UpdateEnvironmentVariables #324

Open
westerdaled opened this issue Sep 30, 2022 · 4 comments

Comments

@westerdaled
Copy link

westerdaled commented Sep 30, 2022

Are there any known samples for the above. So far, we have on found this inelegant format to work and not what is shown in the official guidance: prepopulate connection references

[
   [ "name1", value1"], 
   [ "name12", "value2"],
......
]
@mliloia
Copy link

mliloia commented Oct 13, 2022

@westerdaled : I think, this is what you are looking for.
WaelHamze/dyn365-ce-devops-sample@253c566

@westerdaled
Copy link
Author

westerdaled commented Oct 24, 2022

Hi @WaelHamze

Firstly, I apologize for taking so long in replying - I thought I had.

To give you an update we did attempt the JSON format you suggest but we experienced limited success.

Instead, we created a couple of variables

EnvironmentVarJson

[
	["mysol_EnvironmentName","Development"],
	["mysol_RootFileSystemPath","\\\\domain.local\\UK\\Groups\\Sales\\London\\DEV"],
	["mysol_Sales_DB","DBServer\\Ins_1"],
	["mysol_shared_sharepointonline_683e8d269xxxxxxxxxxx","https://domain.sharepoint.com/sites/keepcalmSales"],
   
]

ConnectionsRefJson

[
	["mysol_NetworkFileSystem","<guid>"],
    ["mysol_sharedexcelonlinebusiness_12b58","<guid>"],
	["mysol_Sharepoint","<guid>"],
	["mysol_SQLServer","<guid>"]
]

These variables we use to update

.\UpdateConnectionReferences.ps1 -CrmConnectionstring $TestConnection -ConnectionReferencesJson $ConnectionRefJson
 .\UpdateEnvironmentVariables.ps1 -CrmConnectionstring $TestConnection -EnvironmentVariablesJson $EnvironmentVarsJson

Now I would prefer your format and would be happy to retry using it a solution I am currently working with. Also,
we haven't been able to automatically deploy the connections needed by a solution. So, we still have to create these manually, whist login in under the service account for the given solution. More than happy to drop that step if you know a way!

@h-karthik12
Copy link

@CrmDev23 @WaelHamze We get error when updating the connection reference in managed solution and unmanaged
@westerdaled Did you find any solution

@westerdaled
Copy link
Author

westerdaled commented Aug 18, 2023

We did a couple thing to get successful automated deployments. Firstly, we ensured that all solutions used only their set of connection references, so they could be upgraded and uninstalled independently. Then you have the pre-steps as outlined above using the format for both environment vars and connection references. Finally, ensure your system account used for deployment has the System Admin security role. MS is promoting the alternative PowerPlatform Pipelines. It may suit you if you have a budget for per app or per user premium accounts as these allow access to managed environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants