Hi, There is a better practice that is to create the connection in the app.config file, here the code: Then in your program code you just must call the CRrmServiceClient object as following: CrmServiceClient oMSCRMConn = new CrmServiceClient(ConfigurationManager.ConnectionStrings[“MyCRMServer”].ConnectionString); if (oMSCRMConn.IsReady) { //… } Here documentation: Use connection strings in XRM tooling to connect to Microsoft Dataverse (Dataverse) – Power Apps | Microsoft Docs If this was helpful, please check it as verified to help others finding useful information. Welcome to this amazing community.