A Sandcastle Documented Class Library

# WindowsGroupAccount Class

An account representing a Windows group.
Inheritance Hierarchy
System
Object
Dundas.BI.AccountServices
MembershipBaseObject
Dundas.BI.AccountServices
Account
Dundas.BI.AccountServices
ExternalAccount
Dundas.BI.AccountServices
ExternalGroupAccount
Dundas.BI.AccountServices
WindowsGroupAccount

Namespace: Dundas.BI.AccountServices
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (10.0.0.1002)
Syntax
C#
VB
C++
F#
Copy

    public class WindowsGroupAccount : ExternalGroupAccount

    Public Class WindowsGroupAccount
    	Inherits ExternalGroupAccount

    public ref class WindowsGroupAccount : public ExternalGroupAccount

    type WindowsGroupAccount =
        class
            inherit ExternalGroupAccount
        end

The WindowsGroupAccount type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| WindowsGroupAccount(String) | Initializes a new instance of the WindowsGroupAccount class.
| WindowsGroupAccount(String, String) | Initializes a new instance of the WindowsGroupAccount class.

Top
Properties

| Name | Description
--- | --- | ---
| AccountType | Gets the type of the account. (Inherited from Account.)
| AllowedIPAddresses | Gets or sets the allowed IP addresses. (Inherited from MembershipBaseObject.)
| CreatedTime | Gets the UTC time the account or group was created. (Inherited from MembershipBaseObject.)
| Culture | Gets or sets the culture associated with the account or group. (Inherited from MembershipBaseObject.)
| CustomAttributes | Gets the account or group's explicitly assigned custom attributes. (Inherited from MembershipBaseObject.)
| DeniedApplicationPrivilegeIds | Gets the IDs of standard privileges denied to the account or group. (Inherited from MembershipBaseObject.)
| Description | Gets or sets a description that may be associated with the account or group. (Inherited from MembershipBaseObject.)
| DisplayName | Gets or sets the display name of the account. (Inherited from Account.)
| EffectiveDisplayName | Gets the effective display name of the account. (Inherited from Account.)
| EmailAddress | Gets or sets the account's email address. (Inherited from Account.)
| FederatedAuthenticationProviderIds | Gets a collection containing the IDs of any federated authentication providers that can be used in conjunction with the account. (Inherited from ExternalAccount.)
| GrantedApplicationPrivilegeIds | Gets the IDs of standard privileges granted to the account or group. (Inherited from MembershipBaseObject.)
| Id | Gets the unique identifier of the account or group. (Inherited from MembershipBaseObject.)
| IsApiAccount | Gets or sets a value indicating whether the account is an "API account". (Inherited from Account.)
| IsEnabled | Gets or sets a value indicating whether the account is enabled. (Inherited from Account.)
| IsSeatReserved | Gets or sets a value indicating whether the account has a reserved seat. (Inherited from Account.)
| LastLogOnIpAddress | Gets the IP address where the user last logon. (Inherited from Account.)
| LastLogOnTime | Gets the UTC time the account last logged on. (Inherited from Account.)
| LogOnCount | Gets the number of times this account has logged on. (Inherited from Account.)
| Name | Gets or sets the name of the account or group. (Inherited from MembershipBaseObject.)
| SeatKind | Gets or sets the kind of the seat used by the account or group. (Inherited from MembershipBaseObject.)
| SessionTimeout | Gets or sets the explicit session idle timeout for the account. (Inherited from Account.)
| TenantId | Gets or sets the ID of the tenant associated with the account/group. (Inherited from MembershipBaseObject.)
| TimeZone | Gets or sets the time zone associated with the account. (Inherited from MembershipBaseObject.)
| TrackLogOnHistory | Gets or sets a value indicating whether log on history should be tracked for the account. (Inherited from Account.)
| Warnings | Gets a list of warnings associated with the instance. (Inherited from MembershipBaseObject.)

Top
Methods

| Name | Description
--- | --- | ---
| SetFederatedAuthenticationProviderIds | Sets the federated authentication provider IDs. (Inherited from ExternalAccount.)

Top
Examples

This example demonstrates how to create the Dundas BI engine, start the Dundas BI engine, log on, create a windows user group account, and then shutdown the Dundas BI engine.

C#
Copy

    using Dundas.BI;
    using Dundas.BI.AccountServices;
    using Dundas.BI.Services;
    using System.Collections.ObjectModel;
       ...

    // Create the engine.
    EngineManager.CreateEngine(
        // Path to the application's data folder. Type: System.String
        @"C:\Program Files\Dundas Data Visualization Inc\Dundas BI\Instances\Instance1\www\BIWebsite\App_Data"
    );

    try
    {
        // Start the Dundas BI Engine.
        EngineManager.StartEngine();

        // Create a caller context not associated with any session.
        Engine.Current.GetService<ICallerContextService>().CreateAndSetCurrentContext(null);

        // LogOn.
        LogOnResult logOnResult = Engine.Current.GetService<ILogOnService>().LogOn(
            // The account name. Type: System.String
            "admin",
            // The password. Type: System.String
            "1234",
            // Delete other sessions for the logon to succeed. Type: System.Boolean
            true,
            // Culture to associate with the session, or null. Type: System.Globalization.CultureInfo
            null
        );

        // Set the current session ID.
        Engine.Current.GetService<ICallerContextService>().CurrentContext.SetCurrentSessionId(
            logOnResult.Session.Id
        );

        // Get the account service.
        IAccountService accountService =
            Engine.Current.GetService<IAccountService>();

        // Create a windows group account.
        WindowsGroupAccount groupAccount = new WindowsGroupAccount("dundas", "newemployees");

        // Set some properties
        groupAccount.DisplayName = "New Employees";

        // Save the account.
        accountService.SaveAccount(groupAccount);

    }
    finally
    {
        EngineManager.ShutdownEngine();
    }

See Also

#### Reference

Dundas.BI.AccountServices Namespace