The refresh token has expired due to inactivity

Occasional Contributor

I'm trying to add a team to an existing O365 group using PnP-PowerShell

When I'm using the below PnP PowerShell cmd (this command uses my credentials from CredentialManager in Windows)

 

Connect-PnPOnline -Url https://xxx.sharepoint.com/sites/xxx
Add-PnPTeamsTeam

To add a team to a O365 group I get this error

 

"AADSTS700082: The refresh token has expired due to inactivity.\u00a0The token was issued on 2020-05-02T07:49:52.9345328Z and was inactive for 90.00:00:00.},"error.redirectUrl":"https://xxx.sharepoint.com/sites/xxx?reauthid=2.MXwwfA.Ec3D"

 

When using:

 

Connect-PnPOnline -Url https://xxx.sharepoint.com/sites/xxx -UseWebLogin
Add-PnPTeamsTeam

The command works. But we do this in an automated process so we want to use CredentialManager credentials.

 

We tried to invalidate all tokens using:

https://blog.enablingtechcorp.com/revoke-all-user-sessions-for-azure-ad-and-office-365

But no luck

 

Is there any way I can refresh or invalidate the token?

 

0 Replies