Loading
Feature Degradation | Agentforce Voice Read More

403 forbidden error as response to an HTTP request sent as part of the deployment to Cloudhub 2.0 using a connected app

Publish Date: Jul 18, 2025
Resolution

SYMPTOM

While trying to deploy an application to Cloudhub 2.0 using Mule Maven Plugin, there is a 403 (forbidden) error on a request to the following endpoing:
https://anypoint.mulesoft.com/runtimefabric/api/organizations/{OrgID}/targets/{target}/environments/{environmentID}/domains

Running the deployment using the -X option in the Maven command for debugging details will show more details so you will be able to find the following error:
[...]
[DEBUG] HTTP Request
GET https://anypoint.mulesoft.com/runtimefabric/api/organizations/{OrgID}/targets/{target}/environments/{environmentID}/domains
Accept: application/json
User-Agent: mule-deployer/3.8.1
Authorization: bearer {token}
x-anypoint-session-extend: true
X-ANYPNT-ENV-ID: {env-id}
X-ANYPNT-ORG-ID: {org-id}
[DEBUG] HTTP response
403 Forbidden
expires: 0
Server: nginx
x-frame-options: DENY
Connection: keep-alive
pragma: no-cache
Date: Tue, 05 Sep 2023 16:08:31 GMT
Strict-Transport-Security: max-age=31536000; includeSubDomains
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
Content-Length: 242
cache-control: no-cache, no-store, max-age=0, must-revalidate
x-anypnt-trx-id: 133f0
Content-Type: application/json
{"timestamp":"2023-09-05T16:08:31.823+00:00","status":403,"error":"Forbidden","path":"/organizations/{org-id}/targets/{target-id}/environments/{env-id}/domains"}
[ERROR] Failed to deploy oldcastleapg-mulesoft-gitlab-cicd-poc: Could not deploy application.
[...]
 

CAUSE

The error is caused by a missing scope. Usually, the missing scope for this particular error is "Read applications" for the Business Group and Environment you are trying to deploy to.

SOLUTION

Adding the missing scope should solve the issue.

ADDING SCOPES
  1. Navigate to Access Management > Connected Apps.
  2. Click on the connected app name.
  3. Scroll to the bottom of the page and click on "Add Scopes".
  4. Find the scope inside the needed section or try searching the name of the scope using the search box. (*)
  5. Mark the checkbox for the needed scope(s) and then click "Next".
  6. Select the needed Business Groups and click "Next".
  7. Review your selection and if it's correct, click "Add Scopes".
* NOTE: The "Read applications" scope can be found inside the Runtime Manager section.

ADDITIONAL INFORMATION

You can check the article "Minimum permissions and scopes required for deploying CloudHub 2.0 applications" for more infomration on the needed scopes.
Knowledge Article Number

001117570

 
Loading
Salesforce Help | Article