How to add a rule to a custom policy in authorization server API

I want to do this:
using an API call from my NodeJS app. Essentially, attaching a rule to a policy in the custom authorization server that allows a group of users to use it.

Can someone tell me if it is possible? If yes, please send links or example of an API call.

Thank you a ton!

  • John

POST to endpoint:

{{oktaOrgUrl}}/api/v1/authorizationServers{{authz id}}/policies/{{policy id}}/rules

Have you been able to successfully implement this?
I am creating a basic rule with only required fields as a test. I am getting a 500 Internal Server error.

Any ideas?

If you have it implemented, can you plz share your request body?

Any help is much appreciated!

“status”: “ACTIVE”,
“name”: “default”,
“priority”: 1,
“conditions”: {
“people”: {
“users”: {
“include”: [],
“exclude”: []
“groups”: {
“include”: [
“exclude”: []
“grantTypes”: {
“include”: [
“scopes”: {
“include”: [
“actions”: {
“token”: {
“accessTokenLifetimeMinutes”: 120,
“refreshTokenLifetimeMinutes”: 0,
“refreshTokenWindowMinutes”: 1080