#1 2019-01-09 11:35:34

Nayana
Member
Registered: 2018-11-15

Create Users from the backend (Metadata repository)

Hi,
Is it possible to create users from the backend (using reportserver metadata repository)? That user should have access to execute reports?

Please guide us on how to achieve this.


Thanks & Regards
Nayana

Offline

#2 2019-01-09 15:44:09

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Create Users from the backend (Metadata repository)

Hi Nayana,

what do you mean exactly by "create users from the backend"?

Regards,
Eduardo

Offline

#3 2019-01-10 05:27:39

Nayana
Member
Registered: 2018-11-15

Re: Create Users from the backend (Metadata repository)

HI,
A separate user group is maintained in OLTP database and we wanted to sync those users with reportserver metadata. That's why we were trying to create users (insert values to the relevant tables) in teh metadata repository itself without creating them from the ReportServer Application.

What we have tried out is,
to create user and API key inside the report server metadata using sql script and use that user to execute reports without creating users in report server  and assign API Key  in Administration -> Users and Groups. Like below

INSERT INTO rs_usermanager_node VALUES(300333, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 4, 3, NULL, NULL, 4, NULL, 6);
INSERT INTO rs_user VALUES(NULL, 'john', 'wotson', NULL, NULL, NULL, NULL, 'john', 300333);
INSERT INTO rs_user_2_property VALUES(300333, 300444);
INSERT INTO rs_user_property VALUES(300444, 'apikey', 'thisisapikeyofjohn', 0);

Then URL would be like : http://SERVER/reportserver/reportserver/httpauthexport?id=00000&user=john&apikey=thisisapikeyofjohn&format=html&download=false

From this, the relavant user has been created in the reportserver and we were able to see under "Users & Groups". But that user was unable to execute reports using above URL (With APIKey method)


Thanks & Regards
Nayana

Offline

#4 2019-01-10 07:49:45

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Create Users from the backend (Metadata repository)

Hi Nayana,

we don't recommend directly using sql for doing anything in reportserver. At the most, you should use sql to query something. But never to create new reportserver elements. If you use sql directly, you will probably miss some dependencies and you could create behavior that is very difficult to reproduce. You should not do this.

For synchronizing users with an external system, you should use scripting, e.g. a similar script as this for synchronizing users with LDAP: https://reportserver.net/en/guides/scri … sing-LDAP/

This said, please compare the user you created with a user that is working with APIKeys. Maybe some permissions are missing?

"But that user was unable to execute reports using above URL (With APIKey method)" -> Why? What happens exactly? And does this work if you write the exact url with a user created by reportserver?

Regards,
Eduardo

Offline

#5 2019-01-10 08:57:10

Nayana
Member
Registered: 2018-11-15

Re: Create Users from the backend (Metadata repository)

"But that user was unable to execute reports using above URL (With APIKey method)" -> Why? What happens exactly? And does this work if you write the exact url with a user created by reportserver?

Answering to this, if the user created by Reportserver can access via that URL.


Thanks & Regards
Nayana

Offline

#6 2019-01-10 09:03:40

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Create Users from the backend (Metadata repository)

Hi Nayana,

then please compare the user permissions of both users, (check if both have permissions on the report), etc. But, as said, we don't recommend this.

Regards,
Eduardo

Offline

#7 2019-01-10 09:25:54

Nayana
Member
Registered: 2018-11-15

Re: Create Users from the backend (Metadata repository)

We have checked the permission (Permission Management), both are same.


Thanks & Regards
Nayana

Offline

Board footer

Powered by FluxBB