Sign-in problems
What to do when the sign-in to the Datasentinel MCP server stalls, expires, or comes back after it worked.
Applies to: an assistant that signs in to the Datasentinel MCP server with OAuth, and scripts that send a user token. For the normal flow, see How authentication works; for certificate errors, see Self-signed and untrusted TLS certificates. If the sign-in fails at once on a host name you never typed (getaddrinfo ENOTFOUND), see Sign-in fails on an unknown host name.
The login page stays on "Signing in" after a correct password
The page accepted the password but the browser could not hand the session back to the assistant. Each sign-in link is valid once: after the first submit the link is consumed, so a second click shows This sign-in link has expired or has already been used.
Start again from the assistant (its authenticate action, /mcp panel or login command), which produces a fresh link. If it happens every time, the browser is blocked from reaching the assistant's callback address, which is a local address on the machine running the assistant: on a remote server, that means the port forward is missing or the session was opened without it. See Sign in from a server without a browser.
"This sign-in link has expired or has already been used"
A sign-in link lives ten minutes, and works once. Both cases end here: a link opened too late, or a page reloaded or submitted a second time. Start the sign-in again from the assistant; do not reuse the old link.
"Invalid login or password"
The login page shows this generic message for a wrong login, a wrong password, or an account unknown to the platform. Retry on the same page with the credentials you use for the Datasentinel web interface. If they work there but not here, the account may exist in Grafana without being a Datasentinel user: ask an administrator.
"The MCP add-on is not enabled for this Datasentinel licence"
The platform's licence does not include the AI connector. The sign-in is refused for every user until the licence is updated; nothing is wrong with the account.
The assistant loops on authenticate
The assistant asks to sign in, the login succeeds, and it asks again, or it reports that the authorization server does not match. This is the server's public URL disagreeing with the address the assistant connects to: the discovery document advertises one origin as issuer, the assistant uses another (a DNS alias, an IP address, a name behind NAT). Check what the server advertises:
The issuer must be the exact origin your assistants use. If it is not, set DS_MCP_PUBLIC_URL on the MCP service, as described in TLS hostname mismatch on API calls, and register the server in the assistant under that same name.
The tools fail with a 401 after days without use
A session ends after ten days without using the server. The assistant then shows the server as needing authentication again, or its calls come back unauthorized: sign in again from the assistant, and the session is good for another ten days of use. An administrator ending the session has the same effect.
A 401 with a user token in a header
A script that sends the platform's user token as an Authorization: Bearer header gets a 401 when the token has passed its 24-hour lifetime, because the server never renews it. Mint a new one and update the header; Refresh the user token automatically does this for a scheduled job. A 401 right after minting means the token is not reaching the server: check the header name and the Bearer prefix.
Where the server logs it
On the platform, the MCP server writes every authentication event to /datasentinel/log/mcp.log, one line each, with the client and the user but never the password or a token:
An assistant registered itself
oauth client registered
A sign-in succeeded
oauth login accepted for <email>
A sign-in was refused
oauth login refused
A session was opened or renewed
oauth tokens issued for <email> ... (code exchange) or (refresh)
A session started serving requests
session opened for <email>
A bearer was rejected
bearer rejected on /mcp
A session was ended by revocation
oauth refresh token revoked
To follow one user's sign-in from the login to the first tool call:
Every line carries the MCP session id, so the same id in later lines ties the tool calls to the sign-in.
For the other lines, and what each failure means, see Find the cause in mcp.log.
Last updated