Skip to main content

Policies

Authentication policies decide who may sign in, from where, and with what factor. The policy service also discovers existing Active Directory policies and previews the impact of a change before you commit it.

Policy lifecycle

ScreenMethodEndpoint
List policiesPOST/api/v1/policyService/ListPolicy
Create policyPOST/api/v1/policyService/CreateJSONPolicy
Update policyPOST/api/v1/policyService/UpdateJSONPolicy
Approve policyPOST/api/v1/policyService/approvePolicyJSON
Revoke policyPOST/api/v1/policyService/revokePolicyJSON
Delete policyPOST/api/v1/policyService/deletePolicyJSON
Execute policy actionPOST/api/v1/policyService/PolicyAction

Discovery and impact

ScreenMethodEndpoint
Discover AD policiesPOST/api/v1/policyService/DiscoverADPolicies
Apply discovered policiesPOST/api/v1/policyService/ApplyDiscoveredPolicies
Preview policy impactPOST/api/v1/policy/json/previewImpact
Get effective policyPOST/api/v1/policy/json/getEffectivePolicy

Policy targets

These endpoints populate the pickers used when building a policy: the groups, users, organizational units and source IP ranges a rule can be scoped to.

ScreenMethodEndpoint
List AD groups for policyPOST/api/v1/policy/listADGroups
List AD users for policyPOST/api/v1/policy/listADUsers
List organizational unitsPOST/api/v1/policyService/listOU
Get policy usersPOST/api/v1/policyService/GetUsers
List source IPsPOST/api/v1/policyService/listSourceIP
Update enrolled groupsPOST/policy/UpdateEnrolledGroups

List policies

POST /api/v1/policyService/ListPolicyPolicies → All policies

Returns the tenant's authentication policies with their approval state. A policy does not take effect until it has been approved.

Body parameters

FieldTypeDescription
orgId (required)integerOrganization the request acts within. Returned to you at onboarding.
tenantId (required)integerTenant inside the organization. Most single-tenant deployments use 1.
pageIdinteger1-based page number. Defaults to 1.
pageSizeintegerRecords per page. Defaults to 10, maximum 100.

Example request

curl -X POST 'https://api.authnull.com/api/v1/policyService/ListPolicy' \
-H 'Content-Type: application/json' \
-H "X-Authorization: $AUTHNULL_TOKEN" \
-d '{ "orgId": 105, "tenantId": 1, "pageId": 1, "pageSize": 10 }'

Responses

200 OK
{
"policies": [
{
"policyId": 42,
"policyName": "Contractor MFA",
"status": "approved",
"appliesTo": "group:Contractors"
}
],
"totalCount": 1
}

Errors

CodeMessageCause
403scope mismatchToken is not scoped to the orgId sent in the body.

Approval flow

Create and update write a draft. Approve activates it, revoke deactivates it without deleting, and delete removes it permanently. Call previewImpact before approving to see which users a rule would newly allow or block.

Payloads needed.

The policy JSON schema is the largest gap in this reference. CreateJSONPolicy and UpdateJSONPolicy accept a policy document whose structure is not documented — send one complete example and this section can specify the whole lifecycle.