With the JWT bearer flow you can use an id_token
ID from an application which is in the same Identity Authentication tenant, or an external id_token
whose issuer is trusted by Identity Authentication.
The issuer of the external corporate identity provider must be configured as a corporate identity provider and set as a default identity provider or configured via Authentication Rules (Conditional Authentication) in the administration console for SAP Cloud Identity Services.
URI:https://<Cloud Identity Services domain>/oauth2/token
The domain part has the following pattern:
<tenant ID>.accounts.ondemand.com
or<tenant ID>.accounts.cloud.sap
. If you have a configured custom domain, the domain has the following pattern: <your custom domain>.Tenant ID is an automatically generated ID by the system. The first administrator created for the tenant receives an activation email with a URL in it. This URL contains the tenant ID. For more information about your tenants, see View Assigned Tenants and Admins.
Content-Typeapplication/x-www-form-urlencoded
**HTTP Method:**POST
Header |
Required |
Values |
---|---|---|
|
Yes |
application/x-www-form-urlencoded |
|
Yes |
|
Parameter |
Required |
Data Type |
Additional Information |
Parameter Type |
---|---|---|---|---|
|
Yes |
string |
|
Request body |
|
Yes |
string |
The user ID configured for basic authentication for the application. For more information, see Configure Secrets for API Authentication. |
Request body |
|
No |
string |
The client secret configured for basic authentication for the application. For more information, see Configure Secrets for API Authentication. |
Request body |
|
Yes |
string |
Same tenant ID token:
External ID token:
|
Request body |
|
No |
string |
Reduces the expiration of a refresh token. It's useful if your application is called from mobile and web applications, and both have different session requirements. If you set the token lifetime to 0, you won't receive a |
Request body |
|
No |
string |
The |
Request body |
|
No |
string |
Reserved. |
Request body |
|
No |
string |
Value must be space deliminated parameter, for example: The supported values are:
|
Request body |
POST /oauth2/token
Content-Type: application/x-www-form-urlencoded
grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer&
client_id=c95ad226-fg34-abc6-abc6-6e8a6b9f2442&
client_secret=PASu9/0sTUeUCG1LAYmSQ18Ut0zrfMz&
assertion=eyJraWQiOiJva3JFVVNsbHRIbGlL...hoXvzy2TgmdPS0LlAXA
Content-Type: application/json
{
"access_token": "dzEyYTM0YmM2OWZhZnU3NmE3OThzNjZmN3NmNjg3MQ",
"refresh_token": "s95s27af4fefae76c798a66f7ef9034",
"id_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJQMT
IzNDU2IiwiYXVkIjoiMjAzZjYyMDktMjRmZi00MmY1LWE0MTMtNmRlNWE5M2ZjM
jYxIiwidXNlcl91dWlkIjoiMDEyM2E0NS1mMWFmLTFmMWMtYTMxMy03NDZkMTIw
YWJjZDkiLCJtYWlsIjoiZG9uYS5tb29yZUBleGFtcGxlLmNvbSIsImlzcyI6Imh
0dHBzOi8vdGVzdHRlbmFudC50ZXN0LmNvbSIsImxhc3RfbmFtZSI6Ik1vb3JlIi
wiZXhwIjoxNjM5MTQ0MDEwLCJpYXQiOjE2MzkxNDA0MTAsImZpcnN0X25hbWUiO
iJEb25hIiwianRpIjoiMzFlMzJjNWYtNjljcC00NmE2LWE5MDctOTExZDExMjA1
czBzIn0.QYftNy7WgISWoKpRXh4_RX5UDNXsXDTndYuIA85L2II",
"token_type": "Bearer",
"expires_in": 3600
}
Related Information
JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants