---
schema_version: "1"
id: b716402fc00329eca955dfdbb19ce27afd0e81e3a46a9a1fca9e78424f332e66
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.1/oauth2-provider-module-troubleshooting.md
canonical_url: https://docs.mulesoft.com/oauth2-provider-module/1.1/oauth2-provider-module-troubleshooting
source_site: docs.mulesoft.com
content_type: documentation
content_hash: f68bf17818d57e3ac4352b8ce1c1f19686c1fab30ce86eb1557c88f2f52e3c17
description: MuleSoft Documentation Site
release: "1.1"
latest: false
---
---
product: OAuth2 Provider Module
version: 1.1
---

# 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)

- [Known Issues](https://help.salesforce.com/s/issues)
