Question: Strange behavior of the credentials save under Windows OS
See original GitHub issueI am not sure if this is on my machine only so it is here just FYI:
I logged yesterday and the auto credentials save seemed to work OK, although I have not checked the Windows Credentials Manager for details.
Today I got the following behavior from the first run:
C:\Projects\office365-cli (customaction-list -> origin) (@pnp/office365-cli@0.4.0)
λ o365
o365$ spo customaction get --id 04e7ede1-e68d-4759-80ec-1e2ab90625cf --url https://xxx.sharepoint.com/sites/xxx --verbose
Error: 401 - {"error_description":"Invalid JWT token. The token is expired."}
Then I did the following
o365$ spo disconnect
o365$ spo status --debug
Not connected to SharePoint Online
o365$ spo connect https://xxx.sharepoint.com/sites/xxx
o365$ spo status --debug
Connected to https://xxx.sharepoint.com/sites/xxx
Is tenant admin: false
AAD resource: https://xxx.sharepoint.com
Access token:
Refresh token: undefined
Expires at: Wed Dec 31 1969 23:59:59 GMT+0000 (GMT Standard Time)
Note on the last o365$ spo connect https://xxx.sharepoint.com/sites/xxx did not asked me for sign in, could be a cache.
However, the disconnect command worked by executing the following steps:
- o365$ spo disconnect
- close the console window
- open the console window
- o365$ spo connect https://xxx.sharepoint.com/sites/xxx
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code D67HVHXXX to authenticate.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Credential manager problems are very (very) bad for signing in
Right click on Credential Manager, then select Properties. Select Automatic for startup type under General tab. Set all dependencies services to ...
Read more >Advice while using Windows Defender Credential Guard ...
Windows credentials saved by Remote Desktop Client can't be sent to a ... DPAPI functions and the user does not experience strange behavior....
Read more >Remote App strange behavior with saved credentials
I have a Windows Server 2016 environment, with it's own domain that provides access to applications to remote clients via Remote App services....
Read more >Prompting of credentials on Edge browser despite already ...
The strange thing is, the application is able to load up on Edge properly, in the logged in state, and then the prompt...
Read more >How to stop Remote Desktop from changing saved login ...
1. When the issue occurs, what do you see in Credential Manager --> Windows Credentials in control panel on your local PC? ·...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I will test tonight and close it if I cannot reproduce.
Thanks for double checking. Theoretically, the expiration should’ve been handled correctly but you never know. We can always revisit if we spot the issue again.