Showing results for 
Search instead for 
Did you mean: 

Error in PowerApps Export Solution task



I am creating a build pipeline for PowerApps Source Control, in my private organization (for POC purpose)

I am following the documents available at

When I run the pipeline it fails at the PowerApps Export Solution task. 



2020-03-09T13:00:50.9395643Z ##[error]Failed to connect to instance: Please verify your credentials for *** and instance url.
ERROR REQUESTING Token FROM THE Authentication context
ERROR REQUESTING Token FROM THE Authentication contextOne or more errors occurred. => AADSTS50034: The user account {EmailHidden} does not exist in the ------------------------------- directory. To sign into this application, the account must be added to the directory.
Timestamp: 2020-03-09 13:00:50Z => Response status code does not indicate success: 400 (BadRequest). => {"error":"invalid_grant","error_description":"AADSTS50034: The user account {EmailHidden} does not exist in the ------------------------- directory. To sign into this application, the account must be added to the directory.\r\n



Unknown errorUnable to connect to CRM: AADSTS50034: The user account {EmailHidden} does not exist in the 72f988bf-86f1-41af-91ab-2d7cd011db47 directory. To sign into this application, the account must be added to the directory.
Unable to Login to Dynamics CRM
2020-03-09T13:00:50.9756159Z ##[section]Finishing: PowerApps Export Solution


Any solution/suggestion on this, Kindly let me know where I am going wrong.

Frequent Visitor

Hi @sneha123,

Have you confirmed that is the correct URL for your environment? i.e. is the correct region specified using the '.crmX' portion of the URL.

Have you confirmed that the User or Application Registration exists in Azure AD for that tenant? The error states it does not which may make it plausible that you are pointing at the incorrect tenant.


Hi @sneha123,


1. Please check whether the processing user is in the instance:

2. Check whether the user has administrator right to export the Solution task


After checking this, please let us know the result.



Hi @ryanspain,


Yes that is the URL for the environment, but I didn't get you when you say 'region specified using the '.crmX' portion of the URL.'

Does the URL varies depending on the region?

And user exists in AAD for the tenant



Hi @JisungHan 


The user have access on the instance also the user have administrator rights to Export the solution.




Do we have any solution for this error, I am still stuck over here. 

I am creating this pipeline in a project, in my local organization. 

Also providing the (my email)username and password in the generic service connection, which I use in the PowerApps Environment URL in the Export task.


I have also registered ''the link in app registrations.


Please let me know if I am missing anything. 








Hey @sneha123,


I completed this lab some time ago and though it is a little outdated, I was able to get a working example running.


I recommend confirming the below:


DevOps Service Connection

When you add your service connection in Azure DevOps, confirm that the user logon is correct. i.e.

  • This should be the a System Administrator or similar user - obviously they must be licensed.
  • Have you tried using a new user? Confirm you can sign in and export solutions with that user in the maker portal.
  • The organization portion of the logon URL should be correct. Note this different from your environment name (orge334c2f1)
  • Ensure you check the box to Allow all pipelines to use this connection
  • I assume your Azure DevOps organisation is in the same tenant as your CDS environment 



Power Apps Tools Installer

This task should be added before any other build tools tasks. Typically it is the first task in the agent, as below. Make sure it is.







PowerApps Build Tools version

What version of the build tools are you using? 



Edit: Additional Question

What are you using an Application Registration for? 


My suggestions come in the absence of any more formal recomendations from the team. 


Hope it helps in some way.



Delayed response here but to respond to your question below:

"Does the URL varies depending on the region?"

Yes - see short mapping of the regions below linking each region to a sample URL.

  • North America => crm =>
  • South America => crm1 =>
  • Europe, Middle East, Africa => crm4 =>

Often I see training/sample material refer to the North America alias - you just need check it.

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Users online (8,412)