SFDX: Failed to decipher auth data. reason: Unsupported state or unable to authenticate data.

Failed to decipher auth data. reason: Unsupported state or unable to authenticate data.

Ever ran into this problem when using SFDX? I faced this issue and did some research and decided to provide my steps to fix this issue.

Problem Use-Case:

You might have your devHub and other sandbox when you try the below command.

sfdx force:org:list

If you find any orgs that have the below red color text

Failed to decipher auth data. reason: Unsupported state or unable to authenticate data.

the above error message indicates that one or more of your sandbox orgs are not authorized either using auth:web:login (or) auth:jwt:grant

Solution:

If you decide to start from scratch, then do the below first.

sfdx force:auth:list

then, do

sfdx force:auth:logout --all

the above command will “log” you out of all DevHub and sandbox orgs that you had connected earlier.

In order to make sure the configs are set correctly, do the below:

sfdx force:config:list

After executing the above command, if you find no config or if your defaultusername and defaultdevhubusername is wrong then execute the below command

sfdx force:config:set defaultusername={devhub username email} defaultdevhubusername={devhub username email}

The above commands should help you with all preliminary configs and you should be fine to run all below commands without a glitch!

sfdx force:org:open
sfdx force:org:create

Published by Sunil Madana

Passionate about Salesforce Platform with 4+ Years of experience as Administrator, Developer and Consultant. Happy to share my experiences with all. Worked for different industries types and have working knowledge on building complex and generic lightning components. #trailheadlover and always love to try new features released on Salesforce platform and helps others with the same.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.