<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

Okta Advanced Server Access Terraform Fails With a 401 Status Code Error

Advanced Server Access
Okta Classic Engine
Okta Identity Engine

Overview

Creating an Okta Advanced Server Access (ASA) project using Terraform returns a 401 status code. This issue occurs when the Okta Advanced Server Access service user is not a member of the admin group. Resolve this error by creating a group with admin privileges and adding the service user account to it.

 

The following error occurs during project creation:

 

Error : [DEBUG] failed to read project state. Project : <project_name> Status Code : 401

 

Applies To

  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • Okta Advanced Server Access (ASA)
  • Terraform

Cause

The Okta Advanced Server Access service user lacks membership in the admin group.

Solution

How is the 401 status code error resolved?

 

Resolve the 401 status code error by creating a group with admin privileges in the Okta Advanced Server Access Admin Console and adding the service user account to the group by following these steps.

  1. Navigate to Groups in the Okta Advanced Server Access Admin Console and create a group with admin privileges if one does not already exist. View the group creation interface in the following image.

Create Group

  1. Navigate to the Users tab for the newly created group and add the service user account. View the users tab interface in the following image.

Users tab

Loading
Okta Advanced Server Access Terraform Fails With a 401 Status Code Error | Okta Support