cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Not authorized for ServiceInvoke on QueryImplementingThings

Highlighted
Newbie

Not authorized for ServiceInvoke on QueryImplementingThings

I'm trying to invoke a service from specific thing subscriptions..


calling "QueryImplementingThings" method of a ThingTemplate using this notation:

     var result = ThingTemplates["iComfortEnviromentBox"].QueryImplementingThings(params);

getting exception "InvalidRequestException: Not authorized for ServiceInvoke on QueryImplementingThings in iComfortEnviromentBox "

Any clue?

I had take a look at thing and thing templates permissions , everything seems fine..

5 REPLIES 5

Re: Not authorized for ServiceInvoke on QueryImplementingThings

Luca, have you given permissions at the Template level or the Thing level? If it is Template, have you set it for the instance permissions?

Re: Not authorized for ServiceInvoke on QueryImplementingThings

hello

I have the same issue when using subscriptions I cannot access to any properties or services, always the same error, despite authorisations given :

"Not authorized for ServiceInvoke ..."

How to call a Thing service (or property) from a subscription ?

Regards

Re: Not authorized for ServiceInvoke on QueryImplementingThings

Hi all,

I have the same issue. I'm calling:

var things = ThingTemplates["MyExampleTemplate"].QueryImplementingThings();

However, when I check MyExampleTemplate (-> Run Time Instance), there is no QueryImplementingThings service available (in the Generic Services). Which Thing / Template should I modify to give the permissions? If I run that as an administrator, it works, so I guess the QueryImplementingThings is implemented somewhere.

BR,

Risto

Re: Not authorized for ServiceInvoke on QueryImplementingThings

Hello all,

In your case, all you need to do is to go to the Run Time instance of your Template and add permissions for this service (NOT Run Time Instance):

Regards,

Jakub.

Re: Not authorized for ServiceInvoke on QueryImplementingThings

Hi Jakub,

Thanks. That worked for me. The "instance" mentioned in the previous messages threw me off the track.

BR,

Risto