# Troubleshooting OIDC Application Sign-In

Use this when an application connected to ID Everywhere with OpenID Connect (OIDC) won't sign people in. For setting up an app, see [Connecting an Application Using OIDC](https://help.ideverywhere.com/books/applications-single-sign-on/page/connecting-an-application-using-oidc).

## Start here

1. Check the application is **Active** under **Sign-In › OIDC Apps**.
2. Check the **Audit Log**, filtered on `oidc`. Look for `oidc.token.denied`, `oidc.userinfo.denied` or `oidc.consent.denied` around the time of the attempt.
3. Note the error the application shows. It's usually one of the codes below.

## Errors and fixes

<table id="bkmrk-error-usual-cause-fi"><thead><tr><th>Error</th><th>Usual cause</th><th>Fix</th></tr></thead><tbody><tr><td>`invalid_redirect_uri` or a redirect error</td><td>The app's callback URL doesn't match the **Redirect URI** registered in ID Everywhere.</td><td>Copy the callback URL from the application into the OIDC app's Redirect URIs exactly: same https, host, path and trailing slash.</td></tr><tr><td>`invalid_client`</td><td>Wrong client ID or client secret, or the secret was regenerated or revoked.</td><td>Copy the client ID again. If the secret was lost or changed, click **Regenerate Client Secret** on the app, then update it in the application. The old secret stops working immediately.</td></tr><tr><td>`unauthorized_client`</td><td>The app is disabled, or isn't allowed to use that sign-in method.</td><td>Check the app is Active and its application type matches how the app signs in. See [Choosing the Right OIDC Application Type](https://help.ideverywhere.com/books/applications-single-sign-on/page/choosing-the-right-oidc-application-type).</td></tr><tr><td>`invalid_grant`</td><td>The sign-in code expired, was already used, or didn't match the PKCE check.</td><td>Start the sign-in again. If it keeps happening, check the app isn't reusing codes and that the server clock is correct.</td></tr><tr><td>`invalid_scope`</td><td>The app asked for a scope ID Everywhere doesn't offer.</td><td>Request `openid`, plus `profile` and `email` if needed.</td></tr><tr><td>`invalid_token`</td><td>The app called the user info endpoint with an expired or invalid access token.</td><td>Have the app use a fresh access token from the latest sign-in.</td></tr><tr><td>`access_denied`: "The user declined to share their information."</td><td>The person clicked **Deny** on the consent screen.</td><td>Sign in again and click **Allow**.</td></tr><tr><td>"User is not authorized for this application."</td><td>The app is registered to a different company than the person signing in. Company apps only accept that company's users.</td><td>Register the app in the person's company, or, if it's an MSP-managed client, check you created it while working in the right company.</td></tr><tr><td>"User is not active."</td><td>The person's ID Everywhere account is disabled.</td><td>Enable them under **Users**.</td></tr></tbody></table>

## Useful values

- **Discovery URL:** `https://app.ideverywhere.com/.well-known/openid-configuration`. Most apps only need this, the client ID and the secret.
- Tokens are signed with **RS256**. Public keys are published at `https://app.ideverywhere.com/.well-known/jwks.json`.

## Test outside the app

Testing with a tool like Postman shows whether the problem is in ID Everywhere or in the application. See [Testing ID Everywhere OIDC with Postman](https://help.ideverywhere.com/books/applications-single-sign-on/page/testing-id-everywhere-oidc-with-postman) and [Troubleshooting OIDC Connections](https://help.ideverywhere.com/books/applications-single-sign-on/page/troubleshooting-oidc-connections).