## 4.1.3.6.7 Using SAP SaaS Provisioning Service APIs to Manage Multitenant Applications
Use the SaaS Provisioning Service (technical name: saas-registry ) APIs to work with multitenant applications.
## Background
Most of the SaaS Provisioning Service APIs are concentrated into two main groups:
1. APIs for Application Providers
2. APIs for Application Consumers
Application providers can use both groups to either manage their application subscriptions from the global account in which they deployed their multitenant application when using the first group, or mimic their consumers in working with the application from a different global account than the one in which their application is deployed, when using the second group.
Consumers can use the second group to work with the multitenant applications.
All SaaS Provisioning Service APIs adhere to the rate limiting rules as described in Rate Limiting [page 2487].
## APIs for Application Providers
##  Tip
Instead of APIs, can use a dedicated user interface with the same capabilities to manage your multitenant application's subscriptions.
For more information, see Using the Subscription Management Dashboard [page 412].
## Prerequisites
- You have a global account and have deployed a multitenant application in it.
- You've registered your multitenant application to the SaaS Provisioning Service. For more information, see Register the Multitenant Application to the SAP SaaS Provisioning Service.
## Preparation
1. For an existing instance of saas-registry service with the application plan, create a service key or service binding if you don't already have one. For more information, see Service Bindings.
2. From the created key or service binding, extract the values of the following fields:
- url
- clientid
- clientsecret
- saas\_registry\_url
You need the first three values to authenticate your SaaS Provisioning Service API requests and the last one as base URL in each API call.
## Authentication
To authenticate, obtain an OAuth token by calling a POST API with the acquired parameters in any REST API tool or directly in your code. For example:
```
curl -XPOST '<url>/oauth/token? grant_type=client_credentials&client_id=<clientid>' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Authorization: Basic <encodedString>'
```
where:
&lt;encodedString&gt; is the result of base64 encoding &lt;clientid&gt;:&lt;clientsecret&gt;.
## Available APIs
Go to SAP Business Accelerator Hub and select the Application Operations for App Providers section to get information about all the available APIs and their details.
You can also try out the APIs in the SAP Business Accelerator Hub.
For more information, see Trying Out APIs.
##  Note
To authenticate to try out the APIs in SAP Business Accelerator Hub, configure an environment.
During the environment configuration, select the OAuth 2.0 Application Flow option from the dropdown menu. You must do so for the Application Provider API group because these specific APIs only support the Client Credentials authentication type.
For more information about configuring an environment in general, see Trying Out APIs in a Configured Environment.
## APIs for Application Consumers
## Prerequisites
- You've created an instance of Cloud Management (technical name: cis ) service with local plan.
## Authentication
To learn how to authenticate, see Getting an Access Token for SAP Cloud Management Service APIs.
## Available APIs
Go to SAP Business Accelerator Hub and select the Subscription Operations for App Consumers section to get information about all the available APIs and their details.
You can also try out the APIs in the SAP Business Accelerator Hub. For more information, see Trying Out APIs.
To authenticate to try out the APIs in SAP Business Accelerator Hub, configure an environment.
For more information about configuring an environment in general, see Trying Out APIs in a Configured Environment.