# Okta "The Requested feature is not enabled in this enviroment"

**URL:** <https://devforum.okta.com/t/okta-the-requested-feature-is-not-enabled-in-this-enviroment/23181>\
**Category:** OAuth/OIDC\
**Created:** [January 27, 2023, 2:14pm UTC](https://devforum.okta.com/t/okta-the-requested-feature-is-not-enabled-in-this-enviroment/23181 "2023-01-27T14:14:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnIGonza](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@JohnIGonza](https://devforum.okta.com/u/JohnIGonza)\
**Post date:** [January 27, 2023, 2:14pm UTC](https://devforum.okta.com/t/okta-the-requested-feature-is-not-enabled-in-this-enviroment/23181/1 "2023-01-27T14:14:33Z")

</div>

Hello, I am working on custom integrations with apps with Okta, I’m a little new to the system so I’m still working out all the details, I am working on code that is suppost to send me to an authentication server through a widget (Single Page App, PKCE required and implicit is enabled in grant type) but I keep getting the error “The requested feature is not enabled in this enviroment” been trying for a few days to fix this with no dice. Here is my code below:

\<!doctype html\>

 Simple Web Page h1 { margin: 2em 0; } 

```
<div class="container">
    <div id="okta-login-container"></div>
</div>

<script type="text/javascript">

```

var oktaSignIn = new OktaSignIn({  
baseUrl: “[https://MYid.okta.com](https://MYid.okta.com)”,  
clientId: “clientID”,  
authParams: {  
issuer: “[https://MYid.okta.com/oauth2/default](https://MYid.okta.com/oauth2/default)”,  
responseType: [‘token’, ‘id\_token’],  
display: ‘page’  
}  
});

if (oktaSignIn.token.hasTokensInUrl()) {  
oktaSignIn.token.parseTokensFromUrl(  
// Interact with authentication server if they attempt to sign in.  
function success(res) {  
var accessToken = res[0];  
var idToken = res[1];

```
    oktaSignIn.tokenManager.add('accessToken', accessToken);
    oktaSignIn.tokenManager.add('idToken', idToken);

    window.location.hash='';
    },
  function error(err) {
    console.error(err);
  }
);

```

} else {  
oktaSignIn.session.get(function (res) {  
// Let use know of active user sessin if they’re still logged in.  
if (res.status === ‘ACTIVE’) {  
document.getElementById(“messageBox”).innerHTML = "Hello, " + res.login + “! You are _still_ logged in! :)”;  
return;  
}  
// If the user is not logged in, then render new login widget.  
oktaSignIn.renderEl(  
{ el: ‘#okta-login-container’ },  
function success(res) {},  
function error(err) {  
console.error(err);  
}  
);  
});  
}

---

<div class="post-metadata">

**Author:** ![JohnIGonza](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@JohnIGonza](https://devforum.okta.com/u/JohnIGonza)\
**Post date:** [January 27, 2023, 3:23pm UTC](https://devforum.okta.com/t/okta-the-requested-feature-is-not-enabled-in-this-enviroment/23181/2 "2023-01-27T15:23:31Z")

</div>

Note: I replace the ID and Links in this code. Within the code they’re my reals ones.

---

<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:** [January 27, 2023, 4:25pm UTC](https://devforum.okta.com/t/okta-the-requested-feature-is-not-enabled-in-this-enviroment/23181/3 "2023-01-27T16:25:38Z")

</div>

try changing the issuer to just `https://MYid.okta.com`, adding /oauth2/default refers to the [Default Authorization Server](https://developer.okta.com/docs/concepts/auth-servers/#default-custom-authorization-server) (associated with the API Access Management feature), which the org you are using doesn’t seem to have. Instead, you’ll have to use the [Org Authorization Server](https://developer.okta.com/docs/concepts/auth-servers/#org-authorization-server).

If you want more details, we have a video about this distinction here: [Okta Authorization Servers for OpenID Connect and OAuth 2.0 Integrations - YouTube](https://www.youtube.com/watch?v=PASiA_2ChFU)

---

<div class="post-metadata">

**Author:** ![JohnIGonza](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@JohnIGonza](https://devforum.okta.com/u/JohnIGonza)\
**Post date:** [January 27, 2023, 5:18pm UTC](https://devforum.okta.com/t/okta-the-requested-feature-is-not-enabled-in-this-enviroment/23181/4 "2023-01-27T17:18:03Z")

</div>

> [@andrea](#):
>
> changing the issuer to just `https`

Hello! So I did it but I just get an error that I need to have a login redirect URI

---

<div class="post-metadata">

**Author:** ![sigama](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/sigama/32/5811_2.png) [@sigama](https://devforum.okta.com/u/sigama)\
**Post date:** [January 30, 2023, 9:26pm UTC](https://devforum.okta.com/t/okta-the-requested-feature-is-not-enabled-in-this-enviroment/23181/5 "2023-01-30T21:26:44Z")

</div>

Hi @JohnIGonza! Can you try adding a login redirect parameter aka `redirectUri:` per - [GitHub - okta/okta-signin-widget: HTML/CSS/JS widget that provides out-of-the-box authentication UX for your organization's apps](https://github.com/okta/okta-signin-widget#spa-application).

---

<div class="post-metadata">

**Author:** ![JohnIGonza](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@JohnIGonza](https://devforum.okta.com/u/JohnIGonza)\
**Post date:** [February 6, 2023, 8:17pm UTC](https://devforum.okta.com/t/okta-the-requested-feature-is-not-enabled-in-this-enviroment/23181/6 "2023-02-06T20:17:52Z")

</div>

SPOT ON! Thanks man! It worked!

---

<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:** [February 7, 2023, 8:19pm UTC](https://devforum.okta.com/t/okta-the-requested-feature-is-not-enabled-in-this-enviroment/23181/8 "2023-02-07T20:19:27Z")

</div>

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