Skip to content

Refresh token expires daily on WSL Ubuntu installation #28040

@austintolani

Description

@austintolani

Describe the bug

I use Az CLI inside of Ubuntu 22.04.3 inside of a Windows machine running WSL. After ~12 hours or so, my refresh token will expire and I will have to run az login and authenticate again.

On the same machine, I have Az CLI installed in Windows. With the same Azure account, I am only prompted to re-authenticate every couple of months.

My understanding is that refresh token expiry time is set by organizational policy. What explains the difference in behavior between the installation of Azure CLI on Windows and within Ubuntu is WSL? Is there any configuration change I can make to fix the behavior within the Ubuntu installation?

Related command

az login

Errors

n/a

Issue script & Debug output

n/a

Expected behavior

I expect that the frequency at which I am prompted to login is consistent across installations.

Environment Summary

azure-cli                         2.53.1 *

core                              2.53.1 *
telemetry                          1.1.0

Dependencies:
msal                            1.24.0b2
azure-mgmt-resource             23.1.0b2

Python location '/opt/az/bin/python3'
Extensions directory '/home/austintolani/.azure/cliextensions'

Python (Linux) 3.10.10 (main, Oct 24 2023, 06:10:14) [GCC 11.4.0]

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions