Troubleshooting

Troubleshooting

Fix the most common failures, from DCR errors to Keycloak invalid_grant.

Checked against the Evaluation environment, Console 0.10.1 / 0.14.1, on October 19, 2026. Release status

Work from the failure point outward. The most common problems in this release are Project mismatches, Pending agents, Keycloak trust configuration, scope configuration and user matching. Where this page names an error code or status, AIGW or Keycloak documents it; where a cause is not confirmed, it is marked Unverified.

Start from the failing stage

StageWho sees itJump to
Dynamic Client RegistrationAgent developerRegistration
Sign-in, consent, authorization codeAgent developerAuthorization
Code exchange, Proxy token, token validationAgent developer, MCP/UCP operatorTokens
/api/credentials/tokenMCP/UCP operatorCredential redemption
Merchant authorization serverMerchant IAM administratorKeycloak
Console screensProject operatorConsole

To isolate a stage, run the same Resource through the Playground. It shows each real AIGW response unmodified.

Registration

SymptomCauseFix
Registration is rejected with an HTTPS errorA redirect URI is not an absolute HTTPS URL, or the Playground was opened over HTTPRegister only HTTPS redirect URIs. For local work, use a tunnel.
The whole registration is rejectedThe body includes a resource scope that isn't registrable for a dynamic clientRemove scope from the registration body and request scopes on the authorization request.
Registration fails with valid redirect URIs and no scopegrant_types or response_types don't match the supported flowSend ["authorization_code", "refresh_token"] and ["code"] with client_secret_post, as in the agent guide.

Authorization

SymptomCauseFix
Authorization is refused right after a successful registrationThe agent is Pending, Rejected or Revoked under the Project's agent policyIn Console, open the Project, then Agents. Approve the agent, or check the approval rules (Project default and per-Resource overrides) and KYA issuers. The Decided by column shows whether policy or a person made the decision.
Authorization fails although the request looks correctThe agent used a core endpoint returned in registration metadata instead of the per-Resource authorization endpointUse authorization_endpoint from https://api.aigw.eval.loginid.ai/<RESOURCE_ID>/.well-known/openid-configuration.
The callback state doesn't matchThe callback belongs to a different or replayed transactionReject the callback and start a new authorization with fresh PKCE values and state.
Requested access isn't grantedThe requested scopes aren't configured on the ResourceRequest only scopes listed in discovery for that Resource.

User consent and agent approval are separate. A well-formed request from a held agent is still refused. Check the agent's status before you debug PKCE or the sign-in flow.

Tokens

SymptomCauseFix
Code exchange failsThe redirect_uri differs from the registered one, or the code_verifier doesn't match the challengeReuse the exact registered redirect URI and the verifier stored for this transaction.
Code exchange fails with credentials in an Authorization headerAgents register with client_secret_post. Other client authentication methods at the token endpoint are Unverified.Send client_id and client_secret in the form body.
Proxy token request returns 401Wrong Proxy client ID or secret, or the Proxy client was revokedCheck the stored values. If the secret is lost, generate a new Proxy client and revoke the old one.
Your service rejects AIGW tokens that the agent just receivedValidation uses the per-Resource issuer or JWKSAgent-facing AIGW tokens use the core issuer and JWKS. Read issuer and jwks_uri from discovery.
The merchant authorization server rejects AIGW's assertion signatureIt trusts the core JWKS instead of the per-Resource JWKSConfigure the Resource's JWKS URI from its Reference screen. Merchant-facing assertions use the per-Resource issuer and keys.
Refresh failsThe refresh token flow is Unverified in this releaseRun the authorization step again to get a new AIGW access token.

Credential redemption

SymptomCauseFix
400Authorization: Bearer or X-Proxy-Token is missingSend the user's AIGW token as the bearer token and your Proxy token in X-Proxy-Token.
401User or proxy authentication failed, the user token lacks ext_token:read, the Proxy client was revoked, or the Proxy client belongs to a different Project than the user's AIGW tokenSend the user's AIGW access token, not an ID token, and use a Proxy client from the same Project as the Resource.
404resource doesn't exactly match the Resource indicator, the Project is wrong, or no credential is cached for this loginCopy the Resource indicator from the Resource configuration, character for character. If it matches, inspect provisioning events.
410 reauthentication_requiredThe merchant refresh token is missing or the merchant rejected it, so AIGW dropped the credentialSend the user through authorization again. AIGW does not re-assert the old login.
500A service or downstream failureInspect Resource events and retry with bounded backoff.
Sign-in succeeded but there is no merchant tokenProvisioning at sign-in is best-effort. The merchant authorization server rejected AIGW, and sign-in continued without a merchant token.Check backend events for provisioning failures, test the merchant grant on its own if you can, then work through Keycloak trust and user mapping.
Redemption fails only on a Resource you configuredRedemption on a newly configured Resource is Unverified in this releaseConfirm the flow on the Playground's default Resource, then compare your Resource and authorization server settings.

For 400, check msgCode and msg in the body. The full table is in the redemption reference.

Keycloak trust and user mapping

Most likely first failure

For a newly created identity provider in Keycloak, user linking or mapping is the most likely first failure. If the asserted sub doesn't resolve to a Keycloak user or federated identity, Keycloak returns invalid_grant and no merchant token is stored.

Keycloak automatically provisioning users from AIGW assertions is Unverified in this release, so plan for the user to exist or be linked already. Full setup is in Configure your authorization server.

Keycloak returns invalid_grant

CheckWhat it should be
User mappingThe asserted sub resolves to a Keycloak user or federated identity
JWT Authorization Grant IdP issuerMatches the AIGW Resource issuer
JWKS URLThe Resource JWKS from the Reference screen
Client settingsThe IdP is allowed on the client
AudienceA custom audience mapping exists
ScopesThe scope configuration is valid

Keycloak returns invalid_client

Likely causeFix
The client authenticator is not Signed JWTSet the client authenticator to Signed JWT.
The signature algorithm is not ES256Set the algorithm to ES256, matching the Resource signing key.
Keycloak can't fetch the Resource JWKS URLMake the JWKS URL reachable from Keycloak.
The Client ID differs between AIGW and KeycloakUse the same Client ID in both.
The client assertion lifetime exceeds Keycloak's configured Max expirationRaise Max expiration in Keycloak to cover the assertion lifetime.

Scope missing from the Keycloak token

  • Create the client scope with Type None.
  • Turn Include in token scope On.
  • Attach it to the AIGW client as Optional.
  • Keep the scope name identical to the requested scope on the AIGW Resource.

Console

Behavior of Console 0.10.1 / 0.14.1 in the Evaluation environment.

ItemStatusWhat to do instead
End Users list (account and project) fails with "Couldn't load end users"Known issueNo workaround is documented for this release.
Test exchange button on a ResourceUnsupportedIt produces no visible result. Test redemption with the Playground's Redeem step.
client_secret_basic for a Token exchange ResourceUnsupportedThe Console asks for a client secret, but the method isn't implemented. Use private_key_jwt.
Domain rules under agent policyPlannedNot available in this release. Use approval rules, or approve agents by hand under Agents.
Some KYA issuers listed as DisabledPlannedNot available in this release. Use the enabled issuers or another agent proof in your approval rules.
Connect provider (custom identity provider)PlannedNot available in this release. Use the identity providers already enabled on your Account.
New agents don't appear as PendingExpectedThe default agent policy approves every agent. Set approval rules to Hold to review agents under Agents, then Pending.

Gaps in event logging for some Resource and signing-key operations, and sign-in preview inconsistencies for some identity provider combinations, were observed in an earlier walkthrough. Both are Unverified for this release.

Paths not verified in this release

If you hit a failure on one of these paths, confirm the same step on a supported path first. These are not known to be broken; they have not been confirmed end to end.

PathStatusSupported path to compare against
Refresh token flowUnverifiedA fresh authorization
Token exchange (RFC 8693) to the merchant authorization serverUnverifiedprivate_key_jwt
Redemption on a newly configured ResourceUnverifiedThe Playground's default Keycloak Resource
Keycloak user auto-provisioningUnverifiedA user that already exists or is linked
Web Bot Auth agent verificationUnverifiedAgent policy approval
Sign-in with each individual identity providerUnverifiedThe providers used in the Playground

The full matrix is on Release status.

Still stuck

Note the stage, the request you sent with secrets removed, the response status and body, and your Project and Resource IDs. Then contact us.

Next steps