cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

Error in PowerApps Export Solution task

Hi,

 

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

I am following the documents available at http://aka.ms/ppalmlab.

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

 

Error

2020-03-09T13:00:50.9395643Z ##[error]Failed to connect to instance: https://org9d4ca161.crm.dynamics.com/. 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.

7 REPLIES 7
Highlighted
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.

Ryan
Highlighted

Hi @sneha123,

 

1. Please check whether the processing user is in the instance: https://org9d4ca161.crm.dynamics.com/

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

 

After checking this, please let us know the result.

 

Highlighted

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

 

Highlighted

Hi @JisungHan 

 

The user have access on the instance https://org9d4ca161.crm.dynamics.com also the user have administrator rights to Export the solution.

Highlighted

Hi,

 

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 'https://orge334c2f1.crm.dynamics.com/'the link in app registrations.

 

Please let me know if I am missing anything. 

 

Thanks 

-Sneha

 

 

 

Highlighted

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 

image.png

 

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.

image.png

 

 

 

 

 

PowerApps Build Tools version

What version of the build tools are you using? 

image.png

 

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.

Ryan

Highlighted

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 => contoso.crm.dynamics.com
  • South America => crm1 => contoso.crm1.dynamics.com
  • Europe, Middle East, Africa => crm4 => contoso.crm4.dynamics.com

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

Helpful resources

Announcements
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.

secondImage

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)