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 "
I had take a look at thing and thing templates permissions , everything seems fine..
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?
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 ?
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.
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):
Thanks. That worked for me. The "instance" mentioned in the previous messages threw me off the track.