---
schema_version: "1"
id: 41952ef3ee5bf34b25b1a0304bb509f2ab03eeb4145601fd5ad36140bc64405c
title: Not Authorized or Problem Logging In Error When Saving External Data Source Configuration
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/api-community-manager/troubleshooting-not-authorized-or-problem-logging-in-when-saving-external-data-source-configuration.md
canonical_url: https://docs.mulesoft.com/api-community-manager/troubleshooting-not-authorized-or-problem-logging-in-when-saving-external-data-source-configuration
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 8f9d8fe7af9aaebfe3faed202f79c393dd5b231f6272d3f98d948cfcdcd8cd08
description: MuleSoft Documentation Site
latest: true
---
---
product: API Community Manager
---

# Not Authorized or Problem Logging In Error When Saving External Data Source Configuration

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

If saving the external data source configuration shows one of the errors "Not authorized" or
"Problem Logging In - No\_Oauth\_State: State was not sent back", follow these steps:

1.  Ensure that the connected app domain is the right domain of the Salesforce organization.

2.  Open Salesforce setup.

3.  Open the authentication providers configuration.

4.  Click the name of the Anypoint Platform authentication provider and ensure that it has these
    settings from the correct connected app in Anypoint Platform:

    1.  Ensure that the consumer key and consumer secret match the connected app in Anypoint
        Platform.

    2.  Ensure that the authorize endpoint URL, token endpoint URL, and default scopes are
        configured as described in [Manual Setup](https://docs.mulesoft.com/api-community-manager/manual-setup).

    3.  Ensure that the test-only initialization URL, OAuth-only initialization URL, callback URL,
        and single logout URL match the correct domain of your Salesforce organization.

    4.  Ensure that your connected app in Anypoint Platform has the same domain as your Salesforce
        organization in its `redirect_uri` setting, a client ID and client secret that match those
        in Salesforce, and correct scopes.

To view details of the connected app, examine the UI or make this API call:

curl -X GET 'https://anypoint.mulesoft.com/accounts/api/connectedApplications/' \\ -H "Content-Type:
application/json" \\ -H "authorization: bearer XXXXXXXXX"

This call returns a response like this:

{ "client\_id": "5fafXXXXXXXXXXXXXXXXXXXXXXXX29c9", "client\_secret":
"9509XXXXXXXXXXXXXXXXXXXXXXXXC10E", "client\_name": "ACM Integration Client", "redirect\_uris": \[
"https://YourOrgDomain.my.salesforce.com/services/authcallback/Anypoint" \], "grant\_types": \[
"authorization\_code", "refresh\_token" \], "public\_keys": \[\], "scopes": \[ "offline\_access",
"full" \], "enabled": true, "owner\_org\_id": "f377XXXX-XXXX-XXXX-XXXX-XXXXXXXX9d08", "as\_id":
"anypoint" }

"YourOrgDomain" is replaced by your organization domain.

## See Also

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