Restrict API method to permission group(s)

Is there a way to restrict the api methods by role (or user)? I can't see anything (on the method builder, the class, or even the API file) but a manual check.

As a workaround, we use qr.Session.Principal.IsInRole inside every method, but I search for a more configurable (and reportable) solution.

Parents Reply
  • Hello Wolfgang,

    You can assign permission groups to API methods using the Designer tool. In the Permissions Editor, there is a menu item "Permissions groups" --> "Assign Web API methods". Pick the permission groups that are authroized to call the selected API. If none are selected, then access is unrestricted (but the default permissions for a table still apply of course).

Children