When to logout a user? [on hold]

I am working on a security project which gives an admin control over certain devices in a company.

When using the product, say the user switches context and opens another tab or skips to another tab, at what time should we log him out and ask him to re-enter his password to continue working. Given that the environment in which user is going to be is mostly within the company, I was assuming a time of 5 minutes after which the user gets logged out.