Sunday, February 12, 2012

API for creating user or group

What's the SOAP API call to create a user or group? It seems that when someone successfully logs into Report Server, a new user is created for that user. However, is it possible to create a list of users on demand?There are no explicit APIs for managing groups or users. In fact, the report server doesn't even know anything about groups - group membership is handled by the Windows APIs. Assuming that users are authenticated and authorized to access resources, the user is created automatically.|||I am using Forms Authentication. Report Manager has the ability to add user/group so there must be an API available. Report Server must know about users/groups because there's a database table that stores user info with relationships to policies and roles.|||

If you are using Forms auth then somebody has written a custom security extension that manages users and groups for you. (Perhaps you are using the sample?) In that case you can see if the security extension provides an API for adding users. If you are using the sample security extension, it does not provide a mechanism (outside of the logon page), you would have to add directly to the table it uses.

You are correct that RS has a table of users and policies, but it does not technically control this list. It always defers to the security extension. When a user comes in RS ask the security extension for the user name and then stores it so that it can keep track of owners. It also stores information on policies, but only to pass back to the security extension to allow the security extension to evaluate if a user has permission to perform the current operation.

|||I wrote the Forms Auth security extension and everything is working fine. I am just confused as to when RS create users and assign roles to them. For example, I want to initially create 5 users and give them permissions to certain folders. Those users are already created in the my own database but not in RS database. So if I use the API to set permissions for them, does RS automatically create the users in its own database? I am also curious as to what actually happens when a new user/group is created via Report Manager. Since Report Manager is built using the same exposed ReportServices2005 SOAP API, there must be a way to create users.|||

RS only adds the users to it's database when it needs to reference the user. If a user creates an item in the catalog or subscribes to a report, the user will be added to our database.

As you said, Report Manager uses the Soap API so it doesn't create any users, it only makes soap calls which may result in a new user row in the RS database.

Is there a reason you feel that the RS database needs to have the user table populated? As long as your security extension knows the users, what RS stores shouldn't be an issue. Perhaps if you explain the issue you are facing we could address that.

|||I want to use Reporting Services to manage reports with several clients. When a new client is added, I will create a folder under the Home folder and create user accounts for their administrators. Then I will assign roles for each user to the folder. So I guess that as soon as I assign roles, that user will be created in the RS database.|||Yep, that is correct.|||

Has anyone tried using the ASP.NET 2.0 Application Services (Membership and Role Management) together with custom extension to authenticate users?

I'm in the process of trying to configure this for a client. We are trying to use as much "out of the box" stuff as possible. Any samples would be usefull.

No comments:

Post a Comment