
AristidesS.75764 (Customer) asked a question.
I've enabled Governance Engine for several pre-existing application integrations t in our Okta tenant. When enabling the Governance Engine, all previously assigned users are set to a custom policy (with no entitlements) by default to ensure no impact.
However, now that I've finished all the technical work, created the entitlements, policies etc. I would have to manually go to each user, edit their entitlements and revert it to policy.
I've tried looking into the API but the replacing grants function is only available for custom grants. Is there a way to handle these situations without this manual work? There's about 200 users in the application so it's not feasible to do it manually, and in the future I will be onboarding more, and bigger applications. If the only way to do so would be manual, it might be better to just build a fully new integration from scratch instead of converting an existing one to the Governance En

@AristidesS.75764 (Customer) -- Looking at the API documentation:
https://developer.okta.com/docs/api/iga/openapi/governance.api/tag/Grants/#tag/Grants/operation/createGrant
POST - /governance/api/v1/grants
In the "grantType" it is selectable from Custom to Policy and changes which fields are required. I've tested having a user set to a Custom then swapping them to Policy successfully.
I've attached an example Workflow "flow" that shows how to accomplish this. Also here is the JSON body:
{
"grantType": "POLICY",
"targetPrincipal": {
"type": "OKTA_USER",
"externalId": "00uxxxxxxxxxx7"
},
"target": {
"externalId": "0oxxxxxxxxxxd7",
"type": "APPLICATION"
}
}
entitlementswap