Okta API Returns Permission Error When Retrieving User Blocks
Last Updated:
Overview
When an administrator attempts to retrieve user blocks via the API, Okta returns a permission error. This occurs because the required security feature requires activation. Enabling the feature in the Admin Console resolves the error.
An administrator makes a GET request to /api/v1/users/{id}/blocks and Okta returns the following error message:
You do not have permission to access the feature you are requesting.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- API
- List All User Blocks
Cause
The API endpoint requires the activation of the Block suspicious password attempts from unknown devices feature.
Solution
NOTE: With this feature active, Okta blocks suspicious password attempts from unknown devices. Users who sign in to Okta with previously used devices avoid lockouts if another device unknown to Okta causes a lockout. Enabling this feature might cause legitimate users to experience login issues. Administrators must test this feature in an Okta Preview environment before enabling it in an Okta Production environment.
How is the permission error resolved?
Navigate to the security settings in the Admin Console and enable the feature that blocks suspicious password attempts from unknown devices.
- In the Admin Console, go to Security > General.
- In the Protect against password-based attacks section, click Edit.
- Select Enabled from the Block suspicious password attempts from unknown devices dropdown menu.
- Click Save.
