<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
0D54z0000ABwlu2CQBOkta Classic EngineAPI Access ManagementAnswered2025-08-25T09:00:30.000Z2024-07-24T15:11:33.000Z2024-07-31T16:46:29.000Z

qwxu5 (qwxu5) asked a question.

Okta Terraform okta_policy_mfa API scopes required

Hey folks,

I'm currently using Terraform and OKTA provider to create an MFA access policy to attach to a SAML for an application.

However, when I try to create an MFA resource via okta_policy_mfa, it throws the following error "Failed to create MFA policy. the API returned an error. You do not have permission to perform the requested action​".

 

My current scopes are:

okta.groups.manage

okta.apps.manage

okta.users.read

okta.appGrants.manage

okta.policies.manage

 

Does anyone know the required API scopes to create okta_policy_mfa resources?

 

Thanks.


qwxu5 likes this.
  • Paul S. (Okta, Inc.)

    Hello @qwxu5 (qwxu5)​ Thank you for posting on our Community page!

     

    From the looks of it, the correct scopes are being used. Make sure that you are also at least and Org admin when doing these calls, in order to have the correct permissions.

    There's an option in TF to tell it if you're on OIE or Classic, so the right endpoint is hit (is_oie): https://registry.terraform.io/providers/okta/okta/latest/docs/resources/policy_mfa#example-usage

    So if you are an Okta Classic org, you should set is_oie to false in your Terraform plan to see if it resolves the issue.

     

    Thank you for reaching out to our Community and have a great day!

    --

    Help others in the community by liking or hitting Select as Best if this response helped you.

    Expand Post
    Selected as Best
  • Paul S. (Okta, Inc.)

    Hello @qwxu5 (qwxu5)​ Thank you for posting on our Community page!

     

    From the looks of it, the correct scopes are being used. Make sure that you are also at least and Org admin when doing these calls, in order to have the correct permissions.

    There's an option in TF to tell it if you're on OIE or Classic, so the right endpoint is hit (is_oie): https://registry.terraform.io/providers/okta/okta/latest/docs/resources/policy_mfa#example-usage

    So if you are an Okta Classic org, you should set is_oie to false in your Terraform plan to see if it resolves the issue.

     

    Thank you for reaching out to our Community and have a great day!

    --

    Help others in the community by liking or hitting Select as Best if this response helped you.

    Expand Post
    Selected as Best
This question is closed.
Loading
Okta Terraform okta_policy_mfa API scopes required