Is there a way to distinguish if a mattermost user is logged in from internal company network?

Actually what would be most useful is to use the REST api on the mattermost server to query the logged in users and get their details, user_id, real name and ip address.

Then I could do some checking on the ip address. In slack this rest api call is named accessLogs (teams.accessLogs I think).

Does mattermost API offer the same, and can you point me to the docs for it?