Connection_id Missing in Logs for Successful Login

Problem statement

Sometimes, log entries for successful logins show the connection_id as an empty object. How does this happen? Will the connection information still be available in Actions or Rules?

Example Log:

{
  "date": "2023-06-27T12:57:34.635Z",
  "type": "s",
  "connection_id": "",
  "client_id": "XyZ***********",
  "client_name": "My-App",
  "details": {
    "prompts": [],
    "completedAt": 1687870654633,
    "elapsedTime": null,
    "actions": {
      "executions": [
        "**************"
      ]
    },
    "session_id": "****************"
  },

}

Solution

If a login attempt occurs and the user already has a session in place, the Success Login tenant log entry is made with an empty connection_id. This is because the authentication was completed through a session cookie instead of through a connection with credentials entered by the user, so there is no connection involved at this point.

Even if the connection_id is missing in the logs, it will still be available in the Rules and Actions for that transaction.