.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

AuthenticationActiveDirectory.CreateUserAutomatically Property

Specifies whether a user is created automatically for the Windows account used to run the application.

Namespace: DevExpress.ExpressApp.Security

Assembly: DevExpress.ExpressApp.Security.v20.1.dll

Declaration

public bool CreateUserAutomatically { get; set; }
Public Property CreateUserAutomatically As Boolean

Property Value

Type Description
Boolean

true, if a user is created automatically for the Windows account used to run the application; otherwise - false.

Remarks

Although the default value of this property is false, it is changed to true in a solution template. When UI-level security is used, you can change this property value in the Application Designer.

Security_CreateUserAutomatically

When the Middle Tier security is used, change this property value in the following manner.

AuthenticationActiveDirectory authentication = new AuthenticationActiveDirectory();
authentication.CreateUserAutomatically = false;
QueryRequestSecurityStrategyHandler securityProviderHandler = delegate() {
    return new SecurityStrategyComplex(typeof(PermissionPolicyUser), 
        typeof(PermissionPolicyRole), authentication);
};

The SecurityStrategyComplex.NewUserRoleName property specifies the Role which is associated with the auto-created users.

You can customize the process of user auto-creation by handling the AuthenticationActiveDirectory.CustomCreateUser event.

See Also