RequireRole attribute with multiple roles

Hi,
i using ReuireRole attributes on my service but for one service i want ot allow all users with SuperAdmin OR ApplicationAdmin

I dont get this to work

[Authenticate]
    [RequiredRole("ApplicationAdmin,SuperAdmin")]
    public object Get(ResourceTimeExceptionQuery request)

Regards Kristian

You should use RequiresAnyRole attribute instead of RequiredRole

[Authenticate]
[RequiresAnyRole("ApplicationAdmin", "SuperAdmin")]
public object Get(ResourceTimeExceptionQuery request)
1 Like

Of course, Very nice! Thx!