Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

Power Platform CLI - pac data export throws "Error: Value cannot be null. Parameter name: path"

(0) ShareShare
ReportReport
Posted on by 25

I tried to play around with the pac data export, but it always ends up with

 

Error: Value cannot be null.
Parameter name: path

Here's what I've done:

PS C:\bin\coretools> pac install latest
Feeds used:
https://api.nuget.org/v3/index.json
Installing package 'Microsoft.PowerApps.CLI' to 'C:\Users\****\AppData\Local\Microsoft\PowerAppsCLI'.
GET https://api.nuget.org/v3/registration5-gz-semver2/microsoft.powerapps.cli/index.json
OK https://api.nuget.org/v3/registration5-gz-semver2/microsoft.powerapps.cli/index.json 473ms
Package "Microsoft.PowerApps.CLI.1.19.4" is already installed.
PS C:\bin\coretools> pac data export --schemaFile "C:\bin\coretools\currency.xml"
Microsoft PowerPlatform CLI
Version: 1.19.4+gfbe2fd6

Error: Value cannot be null.
Parameter name: path

Usage: pac data export --schemaFile [--dataFile] [--overwrite] [--verbose] [--environment]

--schemaFile Schema file name. It can be created using Configuration Migration Tool (alias: -sf)
--dataFile File name for data zip file. Default data.zip (alias: -df)
--overwrite Allow overwrite output data file if it already exists (alias: -o)
--verbose Output more diagnostic information during data import/export (alias: -v)
--environment Environment (id, org id, url, unique name or partial name) (alias: -env)

PS C:\bin\coretools>

 Any suggestion?

  • Verified answer
    prohannes Profile Picture
    25 on at
    Re: Power Platform CLI - pac data export throws "Error: Value cannot be null. Parameter name: path"

    ok, I did not try to set --dataFile as it has a default "data.zip"
    Anyway, thanks!

  • Verified answer
    cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Power Platform CLI - pac data export throws "Error: Value cannot be null. Parameter name: path"

    Ah, ok, I understand now. Yeah, that error message isn't as helpful as it should be. What it's trying to say is that you need to provide a path for where to save the zip file once it's been exported. That is the --dataFile parameter. Screenshot below should be exactly what you're looking for:

    cchannon_0-1668519030469.png

     

  • prohannes Profile Picture
    25 on at
    Re: Power Platform CLI - pac data export throws "Error: Value cannot be null. Parameter name: path"
    ---
    PS C:\bin\coretools> pac data export --schemaFile "C:\bin\coretools\currency.xml"
    Microsoft PowerPlatform CLI
    Version: 1.19.4+gfbe2fd6

    Error: Value cannot be null.
    Parameter name: path
    ---

    does not work

  • cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Power Platform CLI - pac data export throws "Error: Value cannot be null. Parameter name: path"

    🤷 Uninstall PAC and reinstall it?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 87 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 71 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

Overall leaderboard