# Okta-idx-swift identify OIE compatible environment

**URL:** <https://devforum.okta.com/t/okta-idx-swift-identify-oie-compatible-environment/21254>\
**Category:** Questions\
**Created:** [July 14, 2022, 11:01am UTC](https://devforum.okta.com/t/okta-idx-swift-identify-oie-compatible-environment/21254 "2022-07-14T11:01:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmosbah](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@mmosbah](https://devforum.okta.com/u/mmosbah)\
**Post date:** [July 14, 2022, 11:01am UTC](https://devforum.okta.com/t/okta-idx-swift-identify-oie-compatible-environment/21254/1 "2022-07-14T11:01:09Z")

</div>

Hello,  
I’m using okta-idx-swift library to try to connect to a given (client supplied) configuration that can or not be an Okta Identity Engine environment.  
If the configuration is not OIE I’m having this “generic” error when signing in:

```auto
▿ InteractionCodeFlowError
  ▿ apiError : APIClientError
    ▿ serverError : OAuth2ServerError
      - code : "access_denied"
      - description : "The requested feature is not enabled in this environment."

```

ultimately, what I would like to do is to do is to check early on if the environment is an OIE, if not fallback to using `okta-oidc-ios` library.

What would be the recommended way to achieve this ?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [July 14, 2022, 2:56pm UTC](https://devforum.okta.com/t/okta-idx-swift-identify-oie-compatible-environment/21254/2 "2022-07-14T14:56:56Z")

</div>

Interaction Code flow only works in an OIE org.

If you’re trying to dynamically determine if a given org is on OIE, you can check the version an org is on at the [https://OktaDomain/.well-known/okta-organization](https://OktaDomain/.well-known/okta-organization) endpoint. If `pipeline` is `v1`, its a Classic org, if `pipeline` is `idx` its an Identity Engine org.

---

<div class="post-metadata">

**Author:** ![mmosbah](https://avatars.discourse-cdn.com/v4/letter/m/85f322/32.png) [@mmosbah](https://devforum.okta.com/u/mmosbah)\
**Post date:** [July 14, 2022, 3:35pm UTC](https://devforum.okta.com/t/okta-idx-swift-identify-oie-compatible-environment/21254/3 "2022-07-14T15:35:53Z")

</div>

exactly what I needed, thank you !

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [July 15, 2022, 3:36pm UTC](https://devforum.okta.com/t/okta-idx-swift-identify-oie-compatible-environment/21254/4 "2022-07-15T15:36:04Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
