After retrieving the resource ID in Step 2 and the scope ID that you need in Step 3, you can use the POST /environments/{environmentId}/applications/{applicationId}/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.