Okta Admin Management API
/Groups
//
Replace a group rule
OAuth 2.0 scope:
- okta.groups.manage
Replaces a group rule
Note: You can only update group rules that have their status set to
INACTIVE.
Status of group rule. You can't update the status of a rule from INACTIVE to ACTIVE. You must use the activate and deactivate lifecycle operations.
Enum:"ACTIVE""INACTIVE""INVALID"
- https://subdomain.okta.comhttps://subdomain.okta.com/api/v1/groups/rules/{groupRuleId}
Example of a group rule
curl -i -X PUT \
https://subdomain.okta.com/api/v1/groups/rules/0pr3f7zMZZHPgUoWO0g4 \
-H 'Content-Type: application/json' \
-d '{
"type": "group_rule",
"id": "0pr3f7zMZZHPgUoWO0g4",
"status": "INACTIVE",
"name": "Engineering group rule",
"created": "2016-12-01T14:40:04.000Z",
"lastUpdated": "2016-12-01T14:40:04.000Z",
"conditions": {
"people": {
"users": {
"exclude": [
"00u22w79JPMEeeuLr0g4"
]
},
"groups": {
"exclude": []
}
},
"expression": {
"value": "user.role==\"Engineer\"",
"type": "urn:okta:expression:1.0"
}
},
"actions": {
"assignUserToGroups": {
"groupIds": [
"00gjitX9HqABSoqTB0g3"
]
}
}
}'Success
Status of group rule. You can't update the status of a rule from INACTIVE to ACTIVE. You must use the activate and deactivate lifecycle operations.
Enum:"ACTIVE""INACTIVE""INVALID"
Response
{ "actions": { "assignUserToGroups": { … } }, "conditions": { "expression": { … }, "people": { … } }, "created": "2019-08-24T14:15:22Z", "id": "string", "lastUpdated": "2019-08-24T14:15:22Z", "name": "string", "status": "ACTIVE", "type": "string", "_embedded": { "groupIdToGroupNameMap": { … } } }