# OnAuthenticationInformation

This message is sent as the first message from the server after a new WebSocket has been established and the client has sent the first message on the WebSocket. The message informs the client about who the user is and how to log out.

```
{
  "jsonrpc":"2.0",
  "method":"OnAuthenticationInformation",
  "params":
  {
    "userId":"foo",
    "userDirectory":"USERDIR",
    "logoutUri":"https://bar.company.com/qps/user",
    "mustAuthenticate":false
  }
}
```

If the `mustAuthenticate` property is true, the client must navigate to the (then present) `loginUri` for authentication.

```

{
  "jsonrpc":"2.0",
  "method":"OnAuthenticationInformation",
  "params":
  {
    "loginUri":"https://bar.company.com/internal_windows_authentication/?targetUri=<foobar>",
    "mustAuthenticate":true
  }
}
```