Okta Advanced Server Access Terraform Fails With a 401 Status Code Error
Last Updated:
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.
- 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.
- 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.
