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).