# Issues with Microsoft SSO (404 Error) – Solution

**Category:** FAQ

**Version:** 1.0

**Last updated:** Januari 22, 2026

**Author:** Any2Info

### Summary

Over the past few days, some customers have experienced issues with Single Sign-On (SSO) via Microsoft. In specific situations, this can result in a **404 error** during the login process. This issue is caused by a limitation on the maximum allowed URL or query string length within IIS.

By making a small configuration change in the `web.config` of the affected services, this problem can be resolved.

***

### Symptoms

* Logging in via Microsoft SSO occasionally fails
* The user encounters a **404 error** during or immediately after the Microsoft login
* The issue does not occur consistently, but only for specific accounts or scenarios

***

### Cause

Microsoft SSO relies on redirects that include relatively long URLs and query strings.\
By default, IIS enforces a limited maximum length for these values. When this limit is exceeded, IIS returns a 404 error.

***

### Solution

By increasing the maximum allowed length for the URL and query string in IIS, Microsoft SSO can function correctly again.

Add the following configuration to the `web.config` of the relevant service(s):

The relevant services are:

* AppsService
* Platform
* Apps

```xml
<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxUrl="16384" maxQueryString="8192" />
    </requestFiltering>
  </security>
</system.webServer>
```

### Impact

* No functional impact on other parts of the application
* The change is safe and limited to request validation
* Recommended for all environments that use Microsoft SSO

***

### Need help?

If you need assistance applying this change, please contact our support department.

* <Support@any2info.com>

### Changelog

| Version | Date              | Change                               |
| ------- | ----------------- | ------------------------------------ |
| **1.0** | Januari  22, 2026 | Initial documentation version added. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://academy.any2info.com/any2info-academy/faq/issues-with-microsoft-sso-404-error-solution.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
