Redirect Users without any role

Steve2000
Tera Contributor

In the SPEntryPage Script Include, what do I have to edit, to redirect users without any role to the Service Portal.

 

The required properties are already created. I´ve managed to redirect a user with a specific role to the SP. But I also want to do this step with users who don´t have a role at all

4 REPLIES 4

priyasunku
Kilo Sage

@Steve2000 

 

you can try below code

 

if(!user.hasRoles())

return /sp

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful

 

Unfortunately it doesn´t work that way

@Steve2000  please refer below link.

 

https://www.servicenow.com/community/now-platform-blog/6-ways-to-set-up-your-service-portal-for-redi...

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful

 

I tried this, but even though, the user with the specific role doesn´t land on SP page