public void PassOrganizationProxyData() { OrganizationServiceProxy service = CRMHelper.getOrganizationProxy(); ServiceReference1.ProxyServiceClient Obj = new ServiceReference1.ProxyServiceClient(); System.ServiceModel.Description.ClientCredentials cred = service.ClientCredentials; string url = service.ServiceManagement.CurrentServiceEndpoint.ListenUri.ToString(); Obj.getConnectedandReturnAccountName(cred.UserName.UserName, cred.UserName.Password, url); }