# Error: Policy evaluation failed for this request when running Okta-Hosted Login Page Example

**URL:** <https://devforum.okta.com/t/error-policy-evaluation-failed-for-this-request-when-running-okta-hosted-login-page-example/34669>\
**Category:** OAuth/OIDC\
**Created:** [December 16, 2025, 1:48pm UTC](https://devforum.okta.com/t/error-policy-evaluation-failed-for-this-request-when-running-okta-hosted-login-page-example/34669 "2025-12-16T13:48:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenshine](https://avatars.discourse-cdn.com/v4/letter/k/3e96dc/32.png) [@kenshine](https://devforum.okta.com/u/kenshine)\
**Post date:** [December 16, 2025, 1:48pm UTC](https://devforum.okta.com/t/error-policy-evaluation-failed-for-this-request-when-running-okta-hosted-login-page-example/34669/1 "2025-12-16T13:48:39Z")

</div>

I am new to OTKA, have an Integrator account and am have trouble running the OKTA samples.

I am trying to run the Okta Spring Security & Okta-Hosted Login Page Example described here.

[https://github.com/okta/samples-java-spring/tree/master/okta-hosted-login](https://github.com/okta/samples-java-spring/tree/master/okta-hosted-login)

This example uses OKTA as the Authorization server; not a custom one.

I set up the application as described here: As the instructions state, I used the defaults (including naming it My Web App)

[https://github.com/okta/samples-java-spring/tree/master/okta-hosted-login](https://github.com/okta/samples-java-spring/tree/master/okta-hosted-login)

The error message is clear that I have a policy problem. I assume ( but do not know) that the issue is with My Web App. Is that correct?

In My Web App there is a ‘Sign On’ tab which has a ‘User authentication’ section that has ‘Authentication policy.’ Is this the policy to which the error is referring? How do I correct it?

---

<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:** [December 16, 2025, 4:24pm UTC](https://devforum.okta.com/t/error-policy-evaluation-failed-for-this-request-when-running-okta-hosted-login-page-example/34669/2 "2025-12-16T16:24:47Z")

</div>

Did you check the Network tab to see if an API request to Okta is failing? If so, what is the request path and what is the error message?

---

<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:** [January 15, 2026, 4:25pm UTC](https://devforum.okta.com/t/error-policy-evaluation-failed-for-this-request-when-running-okta-hosted-login-page-example/34669/3 "2026-01-15T16:25:11Z")

</div>

Closed on January 15, 2026, 4:25pm UTC

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