<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: EventExecute permissions of an entity is not able to set through service in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/EventExecute-permissions-of-an-entity-is-not-able-to-set-through/m-p/1042611#M70867</link>
    <description>&lt;P&gt;Hi &lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/281982"&gt;@nmutter&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for response. I found the root cause: the EventExcecute Permissions were failing due to a change in json key of the&amp;nbsp;&lt;SPAN&gt;GetInstanceRunTimePermissionsAsJSON() service. It seems the key name has changed from&amp;nbsp;&lt;/SPAN&gt;EventExecute to EventInvoke.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since we have not initiated any platform upgrade, we are quite surprised by this change. If you happen to know anything about this change/upgrade, please share it with us so we can understand what caused this modification.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Nov 2025 12:20:47 GMT</pubDate>
    <dc:creator>Bhavya_PC</dc:creator>
    <dc:date>2025-11-10T12:20:47Z</dc:date>
    <item>
      <title>EventExecute permissions of an entity is not able to set through service</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/EventExecute-permissions-of-an-entity-is-not-able-to-set-through/m-p/1041963#M70829</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to apply &lt;STRONG&gt;runtime permissions&lt;/STRONG&gt; through a service. The code snippet was working fine in one environment, but when I import the same service in another environment, the permissions are &lt;STRONG&gt;not applying&lt;/STRONG&gt;. Specially, all other permissions apply &lt;STRONG&gt;except&lt;/STRONG&gt;&amp;nbsp;for &lt;STRONG&gt;EventExecute.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the shared working code snippet:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Working code:&lt;/P&gt;&lt;DIV&gt;json = ThingTemplates["BasePlatform"].GetInstanceRunTimePermissionsAsJSON();&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;json["permissions"].push({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"PropertyRead": [{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"isPermitted": true,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"name": userGroup,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"type": "Group"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"PropertyWrite": [{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"isPermitted": false,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"name": userGroup,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"type": "Group"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"ServiceInvoke": [{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"isPermitted": true,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"name": userGroup,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"type": "Group"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"EventExecute": [{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"isPermitted": false,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"name": userGroup,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"type": "Group"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"EventSubscribe": [{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"isPermitted": false,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"name": userGroup,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"type": "Group"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"resourceName": "*"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ThingTemplates["BasePlatform"].SetInstanceRunTimePermissionsAsJSON({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;permissions: json /* JSON */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Could anyone suggest why the &lt;STRONG&gt;EventExecute&lt;/STRONG&gt; permissions specifically might be failing to apply after the environment transfer? Are there any prerequisite settings for event permissions that might be missing in the environment?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 13:48:26 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/EventExecute-permissions-of-an-entity-is-not-able-to-set-through/m-p/1041963#M70829</guid>
      <dc:creator>Bhavya_PC</dc:creator>
      <dc:date>2025-11-05T13:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: EventExecute permissions of an entity is not able to set through service</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/EventExecute-permissions-of-an-entity-is-not-able-to-set-through/m-p/1042214#M70844</link>
      <description>&lt;P&gt;Not sure. I would assume that the entity already has EventExecute permissions and the JSON object you create by just pushing new element may be 'wrong' in the end? You would need to check expected json object for the as JSON call (I do not know it tbh).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I would recommend using the "normal" service to set permissions (as they manage the json magic for you in the background ;))&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;ThingTemplates["BasePlatform"].AddInstanceRunTimePermission({
	principal: userGroup /* STRING */,
	allow: false /* BOOLEAN */,
	resource: "*" /* STRING */,
	type: "EventExecute" /* STRING */,
	principalType: "Group" /* STRING */
});&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Setting ALL permissions via the json seems to scary for me &lt;LI-EMOJI id="lia_winking-face" title=":winking_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 17:17:05 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/EventExecute-permissions-of-an-entity-is-not-able-to-set-through/m-p/1042214#M70844</guid>
      <dc:creator>nmutter</dc:creator>
      <dc:date>2025-11-06T17:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: EventExecute permissions of an entity is not able to set through service</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/EventExecute-permissions-of-an-entity-is-not-able-to-set-through/m-p/1042611#M70867</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/281982"&gt;@nmutter&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for response. I found the root cause: the EventExcecute Permissions were failing due to a change in json key of the&amp;nbsp;&lt;SPAN&gt;GetInstanceRunTimePermissionsAsJSON() service. It seems the key name has changed from&amp;nbsp;&lt;/SPAN&gt;EventExecute to EventInvoke.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since we have not initiated any platform upgrade, we are quite surprised by this change. If you happen to know anything about this change/upgrade, please share it with us so we can understand what caused this modification.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Nov 2025 12:20:47 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/EventExecute-permissions-of-an-entity-is-not-able-to-set-through/m-p/1042611#M70867</guid>
      <dc:creator>Bhavya_PC</dc:creator>
      <dc:date>2025-11-10T12:20:47Z</dc:date>
    </item>
  </channel>
</rss>

