Skip to main content
1-Visitor
June 7, 2016
Question

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-Regular Member
June 7, 2016

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?

Translate
1-Visitor
February 27, 2017

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

Translate
1-Visitor
November 22, 2016

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

Translate
1-Visitor
February 27, 2017

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.

Translate
1-Visitor
February 27, 2017

Hi Jakub,

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

BR,

Risto

Translate