1

access denied problem while execute report using full access token

Тема: access denied problem while execute report using full access token

Hello,

I am facing problem during build web application using remote sdk ,
I have got login successfully using a token (with duration=0 and access_type=-1 [full access]) and I got session id then
I used that sid to fetch resources and reports data and I succeeded,
But I got error code 7 (Access Denied) when execute report using the following  request and params :

for ex:
svc=report/exec_report&params={"reportResourceId":15742553,"reportTemplateId":29,"reportObjectId":1,"reportObjectSecId":0,"reportObjectIdList":[],"interval":{"from":1548104400,"to":1548536340,"flags":0}}&sid=valueIHaveGotAfterLogin




is another mean for "access denied – error 7 code" ?is there problem in generated token or there is something which I missed?
I read remote api documentation and I can’t define where is the problem

I hope to help me with a details

note :
basic steps flow
1- login with token and get sid (done)
2-fetch resources with it's reports and driver groups data (done)
3- i have got error 7 while try execute report request (here is the problem)

i recreated token many times but the problem still exist
i hope to help me
thanks

2

access denied problem while execute report using full access token

Re: access denied problem while execute report using full access token

error 7 for exec_report possible in the following cases:

  • User doesn't have "Execute reports" access right to reportObjectId
  • User doesn't have "View reports" access right to reportResourceId

In your request you specified: "reportObjectId":1. Try to pass real unit id (or unit group/resource, depends on your report type).

3

access denied problem while execute report using full access token

Re: access denied problem while execute report using full access token

Fadi Ramzi as it is a group report, you need to specify reportObjectSecId, which is in your case 1. reportObjectId would be the resource id, in your case 15742553.
The final line will be:

svc=report/exec_report&params="reportResourceId":15742553,"reportTemplateId":29,"reportObjectId":15742553,"reportObjectSecId":1,"reportObjectIdList":[],"interval":{"from":1548104400,"to":1548536340,"flags":0}}&sid=
4

access denied problem while execute report using full access token

Re: access denied problem while execute report using full access token

rual
thank you very much,you saved me smile