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.
Hi @PanneerS,
I can see from the logs that you are connected to an environment named 'Trial Environment'.
Assuming this is the environment you intend to connect to, is your service connection in Azure DevOps using credentials for a user/app that has access to this environment?
Additionally, could you copy a screenshot of the solution unique name? You can verify it exists in your environment via the maker portal or using the below OData query in your browser.
https://<YOUR_TRIAL_ENV_UNIQUE_NAME>.crmX.dynamics.com/api/data/v9.2/solutions?$filter=uniquename%20eq%20%27powerapp_demo%27
Replace <YOUR_TRIAL_ENV_UNIQUE_NAME> and the X for the region you are in.
@ryanspain I am trying to export a solution using Power Platform Export solution in azure devops but it was throwing an error, The given unique name was not valid.
Both SolutionName in PowerApps and DevOps are same.
Extensions used: Power Platform Build Tools (2.0.10)
Error:
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.
Often I see training/sample material refer to the North America alias - you just need check it.
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.
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.
Ryan
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
Hi @JisungHan
The user have access on the instance https://org9d4ca161.crm.dynamics.com also the user have administrator rights to Export the solution.
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 @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.
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399