<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Receiving Error Code E0000006 When Calling Okta Management API Despite Having Correct Scopes
API Access Management
Okta Classic Engine
Okta Identity Engine
Overview

When making a call to the Okta Management API, the request fails with error code E0000006. This occurs even when the access token includes the correct OAuth 2.0 scopes.

The API response returns the following error message:

 

You do not have permission to perform the requested action

 

Applies To
  • Okta Management API
  • OAuth 2.0
  • Client Credentials Grant
  • Service Applications
Cause

This error occurs because the entity associated with the access token (either a user or a service application) does not have the required administrator roles assigned to perform the specific action.

 

While OAuth 2.0 scopes grant the application authorization to interact with the API endpoint, the actor must also possess the specific Role-Based Access Control (RBAC) permissions required to execute the request. For service applications using the Client Credentials grant type, the application itself acts as the administrator and must be assigned the relevant roles directly.

Solution

Follow the steps below to assign the necessary permissions to the service application or user.

 

Service Applications (Client Credentials)

  1. In the Okta Admin Console, select Applications > Applications.
  2. Select the service application used to generate the access token.
  3. Select the Admin roles tab.
  4. Select Edit assignments.
  5. Assign the appropriate administrator role (for example, Org Admin, or a specific custom role) that grants permission to perform the desired action.
  6. Select Save Changes.

Users

  1. In the Okta Admin Console, select Security > Administrators.
  2. Select the Admins tab.
  3. Select Add administrator.
  4. Select the user in the Select admin field.
  5. Select the required role and select Save.

Related References

Loading
Receiving Error Code E0000006 When Calling Okta Management API Despite Having Correct Scopes