Loading

ConnectedApps-How to Manage Existing Client Applications

Julkaisupäivä: Mar 2, 2024
Tehtävä

GOAL

With the current implementation Connected Apps [Client Credentials] can only manage the Client Applications that it creates. Refer to this documentation: Creating Client Applications with Connected Apps.

In this article, we will discuss how to manage existing Client Applications using Connected Apps [Client Credentials].
After following these steps, you should not face the 403 Forbidden errors when trying to manage the specific, already-existing Client Application with a Connected App.
 

Vaiheet

1) Retrieve the Organization ID as per this How to know my Organization ID (Org ID) on the Anypoint Platform

2) Retrieve the Org Admin token as per this How to generate your Authorization Bearer token for Anypoint Platform

3) Retrieve the Client Application info that is required to be managed by Connected App by executing the below API
 

https://anypoint.mulesoft.com/exchange/api/v1/organizations/{organization-id}/applications?query=&offset=0&limit=100
https://anypoint.mulesoft.com/apiplatform/repository/v2/organizations/{organization-id}/applications
 

4) Execute the below endpoint with the scope "manage:client_application" for each client application that is required to be managed by Connected Apps. Here the {connected-app-id} is the client ID of the connected application.

Note: This endpoint can only be executed by the user with the Org Admin role in the Master Org.

curl --location --request PATCH 'https://anypoint.mulesoft.com/accounts/api/connectedApplications/{connected-app-id}/scopes' \
--header 'Authorization: Bearer {Organization Admin token}' \
--header 'Content-Type: application/json' \
--data '{"scopes":[
    {
          "scope": "manage:client_application", 
          "context_params": {
               "org": "{organization-id}",
                "applicationId": "{client-application-id}",
                "clientId": "{client-application-client-id}"
           }
         }
     ]
 }'

5) After this the Connected App can manage the Client application added above.

Refer to the article Creating connected app and getting the bearer token example to know more about creating Connected App and getting bearer token using the Connected App client_id/secret.

Note: Connected Apps have limits on the number of apps per user, per organization and also each Connected App can have a limit of scopes. Adding the manage:client_application scope is counted toward this limit. 
For more information on the limits, please refer to our documentation.

Lisäresurssit

 

 

Knowledge-artikkelin numero

001116119

 
Ladataan
Salesforce Help | Article