- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 01:59 AM
Hey hey,
have some experience with forced log out of the agent app?
I have some troubles with new features which are only shown when you logout and login again in the app, for example new push notification.
I do not want to write every user that he/she needs to logout from the app, so my question it is possible to logout all user only from the app, so that they need to login again.
I'm also happy if you have some other solution.
Thanks and regards
Sebastian
Solved! Go to Solution.
- Labels:
-
Agent Mobile App
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2020 10:30 AM
Hi Sebastian,
We don't a supported logout API for mobile but it is a feature on our roadmap, however, you can create a scripted action item that will remove the OAuth token for the current user. It's not a perfect solution but it's a workaround.
Ex:
(function WriteBackAction(input) {
//Type appropriate comment here, and begin script below
var userId = gs.getUserID();
var oAuthCredentials = new GlideRecord('oauth_credential');
oAuthCredentials.addQuery('user', userId);
oAuthCredentials.query();
while (oAuthCredentials.next()) {
oAuthCredentials.deleteRecord();
}
gs.addInfoMessage("You have successfully logged out. Please pull to log back in.");
})(input);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2020 10:30 AM
Hi Sebastian,
We don't a supported logout API for mobile but it is a feature on our roadmap, however, you can create a scripted action item that will remove the OAuth token for the current user. It's not a perfect solution but it's a workaround.
Ex:
(function WriteBackAction(input) {
//Type appropriate comment here, and begin script below
var userId = gs.getUserID();
var oAuthCredentials = new GlideRecord('oauth_credential');
oAuthCredentials.addQuery('user', userId);
oAuthCredentials.query();
while (oAuthCredentials.next()) {
oAuthCredentials.deleteRecord();
}
gs.addInfoMessage("You have successfully logged out. Please pull to log back in.");
})(input);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2020 11:08 AM
Hi Sebastian,
This feature is not something currently prioritized on the backlog. You can help prioritize this feature by submitting to the idea portal: (category:mobile)
https://community.servicenow.com/community?id=ideas_list&sysparm_module_id=enhancement_requests
Best,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2020 02:06 AM
Did you happen to achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2020 02:52 PM
Hi Rama,
Fu's answer is correct -- and that is currently a workaround we've heard of some customers using.
Best,
David