APIGOV-32941 - updated Okata per scope provisioning - #887
Merged
Conversation
Collaborator
✅ Deploy preview is ready!
|
| {{< alert title="Note" color="primary" >}}**Okta per-scope provisioning**</br> | ||
| When using `AGENTFEATURES_IDP_TYPE_{n}=okta`, the agent automatically creates and manages one Okta authorization server policy per OAuth scope per credential. The policy name is derived from `AGENTFEATURES_IDP_OKTA_POLICYNAME_TEMPLATE_{n}`. Policy priority is fixed at `1` and access token lifetime is fixed at `60 minutes`. | ||
|
|
||
| Each requested scope must already be defined on the target Authorization Server before the credential request is submitted. The agent creates the policy and rule to restrict the client to that scope, but it does not create scopes itself. It only reads what is already configured. If a requested scope isn't defined there, credential provisioning fails with an error similar to `okta api POST .../authorizationServers/{id}/policies/{id}/rules returned 400: conditions.scopes.include must only contain the scopes defined for the authorization server`, and the credential shows as `Inactive`/`Failed`. To resolve this, add the scope to the Authorization Server in the Okta admin console under **Security > API > Authorization Servers > *server* > Scopes**, then retry the credential request. |
Collaborator
There was a problem hiding this comment.
Shane, I would bold the "scope must already be defined".
Suggestion to cover the case of not creating missing scopes,
"The agent creates the policy and rule (not any missing scopes) ..."
Collaborator
Author
There was a problem hiding this comment.
I can bold the sentence you're referring to. In regards to your second suggestion, you don't think "The agent creates the policy and rule to restrict the client to that scope, but it does not create scopes itself. It only reads what is already configured. If a requested scope isn't defined there, credential provisioning fails with an error similar to `okta api POST " is enough?
lbadenhop
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for your contribution to the Amplify-Central repo.
Describe the changes
Update Okta documentation for per scope policy provsioning
This can be published on July 23 2026 when the V7 Agent goes GA.
Deploy preview link
Please add the deploy preview link to the specific page that you've changed.
Checklist for contributors
Before submitting this PR: