Microsoft KB Archive/915511

= How to create user accounts by using the Small Business Accounting SDK =

Article ID: 915511

Article Last Modified on 2/6/2007

-

APPLIES TO


 * Microsoft Office Small Business Accounting 2006
 * Microsoft Office Small Business Management Edition 2006
 * Microsoft Office Small Business Accounting 2006 Software Development Kit 1.2

-





INTRODUCTION
This article describes how to create Microsoft Office Small Business Accounting user accounts by using the IRoleInformation interface from the Small Business Accounting Software Development Kit (SDK).



MORE INFORMATION
To create a user account by using the IRoleInformation interface from the SDK, you must run a script that creates the user account, that grants the user account access to the database, and that assigns a Small Business Accounting role to the user account.

The following example contains sample code that performs these tasks. In the sample code, the TestUser user account is added. This user account resides on a computer that is named WORKSTATION1. The second parameter of the AssignUserRole method is an enumeration in the Microsoft.BusinessSolutions.SmallBusinessAccounting.Role type. This parameter represents the role that is assigned to the new user account. In the sample code, the SalesPerson role is assigned to the TestUser user account. ISmallBusinessInstance iSbi = // Initialize SBA instance

IRoleInformation ri = iSbi.CreateRoleInformation; ri.GrantUserDatabaseAccess(@&quot;WORKSTATION1\TestUser&quot;); ri.AssignUserRole(@&quot;WORKSTATION1\TestUser&quot;, Role.SalesPerson);

Keywords: kbmbsmigrate kbhowto KB915511

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.