Working with Apps

These use cases provide example requests to create and activate an OAuth Resource Server, an OAuth Client Apps, and a SAML App using the REST APIs. Each use case also provides the required App attributes.

Note:

To grant appRoles to an App, refer to the provided example in this use case.

The following use cases walk you through the steps to create and activate an OAuth Resource Server App, an OAuth Client App, and a SAML App using the REST APIs:

Grant AppRoles to an App

Use the following example to create a request that grants application roles to an App.

echo "Grant AppRole to App"
cat>/tmp/AppRole.json << __EOF__
  {
    "app":{
      "value":"IDCSAppId"
     },
     "entitlement":{
         "attributeName":"appRoles",
         "attributeValue":"<AppRoleID>"
     },
     "grantMechanism":"ADMINISTRATOR_TO_APP",
     "grantee":{
         "value":"<AppID>",
         "type":"App"
     },
     "schemas":[
         "urn:ietf:params:scim:schemas:oracle:idcs:Grant"
     ]
}
__EOF__

curl -X POST -H "Content-type: application/json" -H "Authorization: Bearer <access token value>" --data @/tmp/AppRole.json http://<IDCS-Service-Instance>/admin/v1/Grants