Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

AuthorizeAttribute.Roles Property

Definition

Namespace:
Microsoft.AspNetCore.Authorization
Assembly:
Microsoft.AspNetCore.Authorization.dll
Package:
Microsoft.AspNetCore.Authorization v1.0.0
Package:
Microsoft.AspNetCore.Authorization v1.1.0
Package:
Microsoft.AspNetCore.Authorization v10.0.0
Package:
Microsoft.AspNetCore.Authorization v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.Authorization v2.0.0
Package:
Microsoft.AspNetCore.Authorization v2.1.0
Package:
Microsoft.AspNetCore.Authorization v2.2.0
Package:
Microsoft.AspNetCore.Authorization v3.0.3
Package:
Microsoft.AspNetCore.Authorization v3.1.18
Package:
Microsoft.AspNetCore.Authorization v5.0.9
Package:
Microsoft.AspNetCore.Authorization v6.0.6
Package:
Microsoft.AspNetCore.Authorization v7.0.5
Package:
Microsoft.AspNetCore.Authorization v8.0.19
Package:
Microsoft.AspNetCore.Authorization v9.0.8
Source:
AuthorizeAttribute.cs
Source:
AuthorizeAttribute.cs
Source:
AuthorizeAttribute.cs
Source:
AuthorizeAttribute.cs
Source:
AuthorizeAttribute.cs
Source:
AuthorizeAttribute.cs
Source:
AuthorizeAttribute.cs
Source:
AuthorizeAttribute.cs
Source:
AuthorizeAttribute.cs
Source:
AuthorizeAttribute.cs
Source:
AuthorizeAttribute.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Gets or sets a comma delimited list of roles that are allowed to access the resource.

public:
 property System::String ^ Roles { System::String ^ get(); void set(System::String ^ value); };
public string Roles { get; set; }
public string? Roles { get; set; }
member this.Roles : string with get, set
Public Property Roles As String

Property Value

Implements

Applies to


Feedback

Was this page helpful?