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

MSCRM Export Solution - Organization cannot be null or empty #50

Closed
cspecker opened this issue Feb 26, 2019 · 12 comments
Closed

MSCRM Export Solution - Organization cannot be null or empty #50

cspecker opened this issue Feb 26, 2019 · 12 comments
Labels
help wanted Extra attention is needed under investigation

Comments

@cspecker
Copy link

Getting the following error using MSCRM Export Solution task in DevOps

##[section]Starting: MSCRM Export Solution: xxx

Task : MSCRM Export Solution
Description : Exports a CRM Solution from the source CRM environment
Version : 10.0.2
Author : Wael Hamze
Help : More information here: https://msdn.microsoft.com/en-us/library/microsoft.crm.sdk.messages.exportsolutionrequest.aspx

Exporting Unmanaged Solution
##[warning]Unable to Login to Dynamics CRM
##[warning]Unable to Login to Dynamics CRM
##[warning]Unable to Login to Dynamics CRM
##[error]Couldn't connect to CRM instance after 3 attempts: Unable to Login to Dynamics CRM
##[section]Finishing: MSCRM Export Solution: RDTaxIncentive

Connection string is AuthType=Office365;Url=https://xxxx.crm6.dynamics.com;UserName=xxx@xxx;Password=xxx

I can log directly onto that CRM instance and can also run Export-XrmSolution powershell script from my dev box with same connection string and it works.

@WaelHamze
Copy link
Owner

@cspecker seems like there is a connectivity issue between the CRM instances and the build agent. Are you using hosting agents or private agents? Sometimes conditional access policies, firewalls, proxies can be the cause of this.

@cspecker
Copy link
Author

cspecker commented Feb 26, 2019 via email

@WaelHamze WaelHamze added the help wanted Extra attention is needed label Feb 27, 2019
@WaelHamze
Copy link
Owner

Hope you get it fix soon. Please re-open case if you have any further questions on this topic.

@WaelHamze
Copy link
Owner

Hope you get it fix soon. Please re-open case if you have any further questions on this topic.

@DineshNanayakkara
Copy link

Hi @WaelHamze ,
I am getting the same error. Do you think it will be an issue if my employer is using 2 factor authentication? Also, if that's the case will there be a fix/enhancement in the current pipeline?

Thanks.

@valerymoskalenko
Copy link

I had the same issue.
My connection string was:

<add name="CRM1" connectionString="AuthType=Office365; Username=valery.moskalenko@contoso.com; Password=password; Url=https://contoso.crm3.dynamics.com"/>

But the right connection string is

AuthType=Office365;Username=valery.moskalenko@contoso.com;Password=password;Url=https://contoso.crm3.dynamics.com

P.S. MFA (2-factor auth) is disabled for this user

@MustaqueEhiya
Copy link

Thanks, I suspect you are right. Thanks for pointing me in the right
direction.

Hi @cspecker - I am also experiencing the same issue with the Export solution. Did you fix this issue?

@MustaqueEhiya
Copy link

I had the same issue.
My connection string was:

But the right connection string is
AuthType=Office365;Username=valery.moskalenko@contoso.com;Password=password;Url=https://contoso.crm3.dynamics.com

P.S. MFA (2-factor auth) is disabled for this user

@valerymoskalenko - I changed the connection string as you mentioned, but still the issue is not fixed with me and I get the error.

@MustaqueEhiya
Copy link

@cspecker seems like there is a connectivity issue between the CRM instances and the build agent. Are you using hosting agents or private agents? Sometimes conditional access policies, firewalls, proxies can be the cause of this.

@WaelHamze - How to check the connectivity issue between the CRM instances and the build agent. Note - I have worked in TFS builds with Dot Projects but this is a new assignment for me to do CI/CD for CRM instance using Azure Devops.

@mkcgphy
Copy link

mkcgphy commented Jul 12, 2019

@WaelHamze : I am getting the same error when I try to build. fYI I am trying to connect using console app and it works fine.

@MustaqueEhiya
Copy link

Hi @mkcgphy - The issue got resolved for me after adding the domain name in the connection string. Please see if that fixes the issue for you.

note this is my connection string: AuthType=Office365;Domain=xxxx; Username=$(CRM_username);Password=$(CRM_password);Server=https://xxxx.crm4.dynamics.com

@Hebbink
Copy link

Hebbink commented Jul 12, 2020

I didn't put parenthesis around the variables in the connection string and that gave me the same error. So after changing
$username
to
$(username)
All was fine again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed under investigation
Projects
None yet
Development

No branches or pull requests

7 participants