Select theme:

Security API | Angular (Angular)Link to this section

When security is enabled Radzen will inject the Security Angular service to all pages. It is available as the security property.

Security methodsLink to this section

isAuthenticated(): boolean

Returns true if the user is authenticated (logged in); otherwise false;

Use it in Radzen as ${security.isAuthenticated()}.

isInRole(role: string | string[]): boolean

Returns true if the user is from the specified role(s) or Administrator; otherwise false;

Use it in Radzen as ${security.isInRole('Sales')}.

Security propertiesLink to this section

get name(): string

Returns the name of the authenticated user.

Use it in Radzen as ${security.name}.

get profile(): any

Returns the profile object of the authenticated user. Contains all claims associated with the user - name, role and custom ones.

For example to get a custom claim called country use ${security.profile.country}

Check Extend Application User for instructions about adding custom properties to the user.

get roles(): string[]

Returns the roles of the authenticated user.

© 2016-2026 Radzen Ltd. All Rights Reserved.
Designed and developed with ❤️ in Radzen Blazor Studio.
IP Geolocation by DB-IP

Select theme: