---
schema_version: "1"
id: 54a09f77d28803ba74685305707defee2572d7c4edc786d44b8aeae2a9659269
title: Troubleshooting OAuth2 Provider Module
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/oauth2-provider-module/1.0/oauth2-provider-module-troubleshooting.md
canonical_url: https://docs.mulesoft.com/oauth2-provider-module/1.0/oauth2-provider-module-troubleshooting
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 435b31ca051ddec7d222b6b0ce80fec7d97dac0defaea5631892ff22eb624dc6
description: MuleSoft Documentation Site
release: "1.0"
latest: false
---
---
product: OAuth2 Provider Module
version: 1.0
---

# Troubleshooting OAuth2 Provider Module

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

To troubleshoot OAuth2 Provider module, become familiar with the information about enabling verbose
logging and interpreting commonly throw messages.

## Enable Verbose Logging

To get a better understanding of why an application’s interaction with OAuth2 Provider module is
failing, temporarily enable verbose logging for the module.

Remember to always disable the enhanced verbosity after troubleshooting, because it affects your
Mule application performance.

To enable verbose logging in the configuration file:

1.  Access Anypoint Studio and navigate to the **Package Explorer** view.

2.  Open your application’s project name.

3.  Open the `src/main/resources` path folder.

4.  Open the `log4j2.xml` file inside the folder.

5.  Add an `<AsyncLogger>` tag inside the `<Loggers>` tag:

    ```xml
    			<Loggers>
    				...
    				<AsyncLogger name="org.mule.extension.oauth2" level="DEBUG"/>
    				...
    			</Loggers>
    ```

6.  Save your application changes.

7.  Click the project name in **Package Explorer** and then click **Run** > **Run As** > **Mule
    Application**.

## Understand Common Throws

Here is a list of common thrown messages and how to interpret them:

- OAUTH2-PROVIDER:CLIENT\_ALREADY\_EXISTS

  A client already exists with the same client ID, and the \*Fail If Present\* field is set to
  \`true\`.

- OAUTH2-PROVIDER:INVALID\_CONFIGURATION

  The provided parameters are invalid, for example, the \*Authorized Grant Types\* field of
  \`AUTHORIZATION\_CODE\` does not have a redirect URI.

- OAUTH2-PROVIDER:NO\_SUCH\_CLIENT

  The client to delete does not exist.

- OAUTH2-PROVIDER:INVALID\_TOKEN

  The token to revoke is invalid.

- OAUTH2-PROVIDER:TOKEN\_UNAUTHORIZED

  The token is invalid or there are missing or wrong fields set in the validation.

- OAUTH2-PROVIDER:OAUTH\_SERVER\_SECURITY

  OAuth2 Provider module throws this error when is unable to identify its reason.

## See Also

- [Salesforce Help](https://help.salesforce.com)
