Open delubi-ro opened 1 year ago
it looks like there's a bug in the model. this seems to work
from okta.client import Client as OktaClient
from okta import models
import asyncio
async def main():
client = OktaClient()
policy = {
"name": "testmfa3456",
"status": "ACTIVE",
"description": "test mfa",
"type": models.PolicyType.MFA_ENROLL,
"settings": {
"type": "AUTHENTICATORS",
"authenticators": [
{
"key": "okta_email",
"enroll": {
"self": "OPTIONAL"
}
},
{
"key": "google_otp",
"enroll": {
"self": "OPTIONAL"
}
},
{
"key": "okta_password",
"enroll": {
"self": "REQUIRED"
}
}
]
}
}
created_policy, r, err = await client.create_policy(policy)
print(created_policy, r, err)
asyncio.run(main())
SDK version
Steps to reproduce:
Using the following test-okta.py
Getting error as