Show the tenant, subscription, resource, endpoint, default model, and refresh-token state that every other pks foundry command operates against.
pks foundry status$ pks foundry statusShow current Foundry auth and selection state
Find out what pks foundry token, pks foundry proxy, and pks foundry usage will talk to. pks foundry status reads the stored credential record and prints it as a table. It makes no network call, so it is the fastest check available.
None. The command runs whether or not you have signed in.
pks foundry status
The table covers the tenant, subscription, resource name and endpoint, resource group, default model, the authentication and refresh timestamps, and whether a refresh token is present.
When nothing is stored, the command prints a yellow hint that you are not authenticated — and still exits 0. Do not branch on the exit code to detect auth state in a script; parse the output, or attempt pks foundry token and check that instead.
Because status never contacts Azure, a refresh token that Azure has since revoked still shows as present. Confirm the credential actually works:
pks foundry token
A printed token means the stored credential is live.
| Flag | Default | Description |
|---|---|---|
-v, --verbose | false | Enable verbose output. |
"Not authenticated" with exit code 0. Expected behavior. Run pks foundry init.
Refresh token shows Present but commands still fail. The stored token is on disk but no longer valid at Azure. Run pks foundry init --force.
The resource is not the one you expected. Selection is global to your user, not per repository, and select or init --force overwrites it. Run pks foundry select to change it back.
No default model listed. Resource selection never completed, or the resource has no deployments. Run pks foundry select.