IP Address of user's audits changes?


As a reference from this API, I want to ask that this API

    "id": "string",
    "create_at": 0,
    "user_id": "string",
    "action": "string",
    "extra_info": "string",
    "ip_address": "string",
    "session_id": "string"

Do the IP address gets updated when a user changes network? and while using the API, do we always get updated API?

Hi @shekharkoirala, the problem is that you are using the Audit API which is for get information about certain specific actions to get information about the user. The IP isn’t updated because the Audits works like a log. You can get the last audited action, and get which was the IP when that action was executed. But then you will relay on the actions that trigger a new Audit entry, and that is not necessarily something that going to happen so often.

Probably here you will need a plugin, or a PR to the mattermost repo including the IP in the exposed data (Probably with an specific config setting disabled by default).