SetGroupCredentials(string, string, object[]) Method

The SetGroupCredentials method of the Credentials class specifies the group credentials for the specified enterprise application definition.

Parameters

strApplicationName   The name of the enterprise application definition. This is not the enterprise application definition friendly name. The maximum allowed number of characters is 128.

strGroupAccount   The group account name. The maximum allowed number of characters is 272. The group account name must be a global domain group in the form of domain_name\\group_name.

Args  Array of ****strings that contain the credentials for the enterprise application definition. The SetGroupCredentials method uses only the first five string parameters in the Args parameter for the credentials. The order of the credentials in the Args array determines the order in which the credentials are stored and retrieved. The maximum allowed number of characters for each credential field is 8,000.

Exceptions

Exception Type Condition
[SingleSignonException Method fails, user does not have correct permission, or an attempt is made to set group credentials for the same application with more than one unique group account.

Remarks

Only members of the single sign-on administrator account or the enterprise application definition manager group can set group credentials.

Note  There is a one-to-one correspondence between an application definition and a group account. Do not attempt to set group credentials for the same enterprise application definition with more than one unique group account.

The SetGroupCredentials method is audited with the result of success or failure and the user that calls the method in the single sign-on database. The ServiceAction enumeration recorded is SetGroupCredentials.

Example

The following code example shows how to use the SetGroupCredentials method. To use this example, replace domain_name\\group_name with a valid domain and group on your network.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security