
MeetA.31575 (Customer) asked a question.
In the Okta Developer documentation, it is mentioned that, following 2 items will be only available as part of Okta Identity Engine.
1. Policy of type ACCESS_POLICY and PROFILE_ENROLLMENT
2. UI Schema
So, when we are trying to fetch UI Schemas using /api/v1/meta/uischemas API endpoint, we are getting this error message βYou do not have permission to access the feature you are requestingβ with status code 401.
But, when we try to fetch Policies of type ACCESS_POLICY and PROFILE_ENROLLMENT using /api/v1/policies?type=${type} API endpoint, we are getting this error message βThe request was not valid: Invalid policy type specifiedβ with status code 400.
As both items are part of the Okta Identity Engine, why are we receiving two different error messages with different status code. Error message we are getting for policy mentioned types doesnβt clearly justify that this item is not part of the Okta Classic Engine as it is for UI Schema.
It would be helpful if Okta support team could explain the rationale behind this. If anybody has seen similar behavior, please share your thoughts in the comment.

Hi, @MeetA.31575 (Customer)β
Thank you for posting on our Community page!
Schema API is an Early Access feature that you will need to enable with the help of your Account Executive.
Also, please check this article for more info on Policy API:
https://developer.okta.com/docs/reference/api/policy/
Thank you for reaching out to our Community and have a great day!
_____________________________________________________________________________
Watch and Learn: New Okta how-to videos, plus what's new this month in the May newsletter.
_____________________________________________________________________________
Community members help others by clicking Like or Select as Best on responses. Try it today.
_____________________________________________________________________________
Hi @User16594883467582706479 (Customer Support Online Experience)β,
Thank you for your reply and references you provided in the answer. I already know about this article: https://developer.okta.com/docs/reference/api/policy/
But, my question is different. Both objects (Policy of type ACCESS_POLICY and PROFILE_ENROLLMENT and UI-Schema) are part of the Okta Identity Engine, then why are we receiving two different error messages with different status code? Errors should be identical so it could help us to differentiate which objects we can fetch without any errors in which okta version classic or Identity.
There is specific mention of this behavior in the okta documentation. That's why I asked π
Thanks.
Hi, @MeetA.31575 (Customer)β
The objects are different, therefore returning different errors. Schema API, as mentioned, is returning that specific error because the feature flag is not enabled for it and you should get in touch with your Account Executive for it. For the Access Policy, you get that error because you did not set a parameter correctly.
401 = you donβt have access to that feature, usually because of a missing feature flag
400 = the feature is allowed, but the parameters you set are incorrect, therefore not returning anything
Hope this helps!
_____________________________________________________________________________
Watch and Learn: New Okta how-to videos, plus what's new this month in the May newsletter.
_____________________________________________________________________________
Community members help others by clicking Like or Select as Best on responses. Try it today.
_____________________________________________________________________________