Skip to Content

XS Advanced: Scopes & Role Templates

Hi Colleagues,

I am developing a NodeJS application on XS Advanced, and I am creating scopes and role templates for my application users. There are two type of roles UserAdmin and User. Is there a way to get which scopes or role templates the user has from the session ? And if so how can I get this information ?

Thank you,

Best Regards,


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 21, 2016 at 05:39 PM

    I'd recommend assigning the scopes to routes/HTTP verbs in the xs-app.json of the web module of your application whenever possible. This allows the checks to take place without application coding.

    If you need the scopes within Node.js, then use the sap-xssec module.

    This module has functions like checkScope.


    checks a scope that is published by an application.


    • scope ... the scope whose existence is checked against the available scopes of the current user. Here, the prefix is required, thus the scope string is "globally unique".
    • returns true if the scope is contained in the user's scopes, false otherwise
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.