Unable to login to cluster using azureADProvider

Hi everyone,
As described here, I have disabled kubeconfig token generation, and tried to download the cluster kubeconfig.
When inspecting the kubeconfig.yaml file I see the following under users[0].user.exec:

exec: apiVersion: client.authentication.k8s.io/v1beta1 args: - token - --server=rancher.mydomain.com - --user=local command: rancher

When I use that config I am not able to login, bellow is the output

❯ k get pods
INFO[0000] Saving config to /Users/myuser/.rancher/cli2.json
https://rancher.mydomain/v3-public/authProviders
Auth providers:
0 - azureADProvider
1 - localProvider
Select auth provider: 0

To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code AGCDVTBNC to authenticate.

FATA[0008] oauth2: "invalid_request" "AADSTS900144: The request body must contain the following parameter: 'code'. Trace ID: XXXX Correlation ID: XXXXXX Timestamp: 2024-09-01 09:13:40Z" "https://login.microsoftonline.com/error?code=900144"
E0901 12:13:39.911534   69856 memcache.go:265] couldn't get current server API group list: Get "https://rancher.mydomain/k8s/clusters/local/api?timeout=32s": getting credentials: exec: executable rancher failed with exit code 1
https://rancher.mydomain/v3-public/authProviders
Auth providers:
0 - azureADProvider
1 - localProvider
Select auth provider:

Rancher CLI exits with status code of 1 before I can put my code into Sign in to your account

Same here, rancher 2.9.1 & Rancher-CLI 2.9.0.

When trying to generate token from windows, the operation successfully.
But from linux machine, the operation failed with the following error:
FATA[0010] error logging in: code: [ServerError] message:[Server error while authenticating]

Rancher side logs:
{“error”:“invalid_request”,“error_description”:"AADSTS900144: The request body must contain the following parameter: ‘code’.

@gmalobany
I was able to get my issue fixed by switching over to Azure’s v2 addresses for auth and token.
I’d suggest that you into that