> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/server/it/knowledge-base/troubleshooting-articles/unexpected-exception.-please-see-server-logs-for-details.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Unexpected exception. Please see server logs for details

Risolve un errore di eccezione imprevista durante l'accesso SSO con Entra ID dopo un aggiornamento di Devolutions Server, causato da un valore del client secret non valido.

Il seguente messaggio di errore compare quando si tenta di connettersi tramite SSO con Entra ID dopo un aggiornamento di Devolutions Server:

`{"errorMessage" :"Unexpected exception. Please see server logs for details.","result":0}`

### Soluzioni

1. Apra Devolutions Server Console e vada a ***Server - Logs***.
2. Individui il seguente errore nei log:

```
OAuthTokenEndpointException - OAuth token endpoint error: {"error":"invalid_client","error_description":"AADSTS7000215: Invalid client secret provided.
```

3. Confermi che il secret inviato nella richiesta sia il valore del client secret, non l'ID del client secret, di un secret aggiunto all'applicazione.
4. Vada all'app web Devolutions Server nel Portale Entra ID.
   1. Si assicuri che l'[autorizzazione API sia impostata e concessa correttamente](https://docs.devolutions.net/server/it/knowledge-base/how-to-articles/configure-microsoft-authentication-with-entra-id.md#app-registration-in-the-azure-portal) in Entra ID, in ***Home*** – ***App registration*** – ***API permissions***. Verifichi inoltre che la registrazione dell'applicazione sia configurata su ***Web*** e controlli che l'indirizzo sia corretto.
   2. Crei un nuovo secret e ne copi il valore. Imposti un promemoria un mese prima della sua scadenza utilizzando il metodo che preferisce.
5. Nell'interfaccia web di Devolutions Server, vada in ***Administration*** – ***Server settings*** – ***Authentication*** – ***Microsoft authentication***. Quindi:
   1. Incolli il nuovo client secret.
   2. Disattivi ***Use specific client ID for users and user groups cache***..
   3. Clicchi sul pulsante ***Reset cache***.
   4. Salvi le modifiche.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/server/it/knowledge-base/troubleshooting-articles/unexpected-exception.-please-see-server-logs-for-details.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
