web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Issue with authenticat...
Power Apps
Unanswered

Issue with authentication in PowerPlatform CLI when application secret is starting with a dash

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have a script that was running smoothly for months and is using the PowerPlatform CLI.

It's used in a DevOps pipeline and it uses the variables defined on that pipeline.

pac auth create --url "$(URL_DEV)" --applicationId "$(CE_ClientId)" --clientSecret "$(CE_ClientSecret)" --tenant "$(CE_TenantId)"

 

However, recently we rotated the secrets of our AAD applications and the new secret now starts with a dash ('-') sign.

Since then, the auth request fails with this error message (where -XXXXXXXXXXXX is in fact my secret including leading dash sign) :

Error: An unknown argument -XXXXXXXXXXXX was passed.

 

I tried escaping it with '`' but the problem remains.

Any idea's?

 

Regards,

Sven Peeters

 

  • CharKune Profile Picture
    Microsoft Employee on at

    Obviously, the workaround is to create another secret that does not begin with a dash (-).

     

    Has anyone created a fix that will allow a leading dash(-)?  

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard