microsoft / microsoft/powerplatform-actions

Pac data export not working with application authentication

Open
#269 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
301
Forks
88
PR merge metrics
No merged PRs in 30d

Description

When I try to download data from Dataverse with an application user, I receive the below error message.

First I run the command to create an auth profile with the following command

pac auth create --url https://xxxxxxx.crm4.dynamics.com/ --name myenvironment --applicationId xxxxx-xxx-xx-xx --clientSecret xxxxxxxxxxxxxxx --tenant xxxx-xx-xxx-xxxx

After that I execute the following command

pac data export --environment myenvironment --schemaFile .\myschema.xml --dataFile mydata.zip

Which results in the follwing error message

Microsoft PowerPlatform CLI
Version: 1.20.3+ga66a744

Error: Organization listing requires a User auth profile, not an Application auth profile


```[tasklist]
### Tasks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the pac auth create and pac data export commands shown in the report with an application authentication profile. Trace the environment lookup that produces “Organization listing requires a User auth profile,” then verify the expected behavior for exporting Dataverse data with application authentication.

Written by the indexing model from the issue text.

Assessment

Domain
authentication, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.