After retrieving the resource ID in Step 3 and the scope ID that you need in Step 4, you can use the POST /environments/{{envID}}/applications/{{appID}}/grants operation to create a new resource access grant for the application.

The body of the request specifies the ID for the resource property (openid) and the ID for the openid scope that you will assign to the application’s resource grant (profile).

The response data shows the resource grant ID and the scope associated with the grant.