5 Replies Latest reply on Jan 12, 2018 6:49 AM by sc-3 RSS
    jdaniel Newbie

    How to programmatically add visibility permissions?

    How do you programmatically refer to a sub-organization in the following example?  I want to add a sub-organization to the visibility permissions of an existing Thing.  The service snippet looks like the following but there's no information on the requirements or formatting of the "principal" and "principalType" strings.


    var params = {

      principal: mySubOrganization,

      principalType: "Organization"




    If I have an organization named “Org” and that organization contains a sub-organization called “Sub”, what should I enter for the "principal" string?  Is this the proper form of the property?

    mySubOrganizaiton = "Org:Sub";

    Next, what is the correct string to use for the "principalType"?  I've tried "Organization", "OrganizationUnit", and "Organization Unit" without success.

    Lastly, where is this information documented?

    Thanks -