Start a new topic
Solved

RoyalJSON - Support for referring to credentials "outside" of the JSON

It appears as though that in a Dynamic Folder Script, you can only refer to Credential objects which are defined within the generated JSON?


I have my Credentials manually defined outside of the dynamic folders, and I would like to reference them. I've tried setting CredentialID to the name of the credential and also the GUID of the credential (taken from viewing the source of the RTSZ file) but neither work.


Also, there are some Windows Server properties which would be nice to set, but don't seem to be possible in RoyalJSON at the moment. For example RedirectDrives etc.


(Nevertheless, this Dynamic Folder Script approach is a fantastic solution!)


Hi Matthew,


Regarding Credentials:


you can assign credentials from outside the dynamic folder as well as from inside the dynamic folder.

Royal TSX has various different techniques for credential assignment. You mentioned two of them:

  • Via ID
  • Via Name

Additionally you can let Royal TSX inherit credentials from the object's parent folder or directly specify a username and password on the object itself.

All of these credential modes have different properties in RoyalJSON. Here's an excerpt from our documentation:


CredentialsFromParent

Data Type: Boolean

Applies To: Most object types that support credentials

Description: Specifies whether or not to use the credentials of the parent folder.

Example: "CredentialsFromParent": true


CredentialID

Data Type: String

Applies To: All object types that support credentials

Description: The ID of the credential that is assigned to this object. This can either be a GUID (formatted as string) or any other generic string. If you pass in a GUID it will be directly used to set the Credential ID of the resulting object. No validation is performed in this case. If you pass in any other string, the external to internal ID mapping table will be searched for a match. If no match is found, the property will be ignored. Otherwise the internal ID will be used to reference the credential.

Supported Values:

  • GUID formatted as string

  • String

Example: "CredentialID": "041471cd-1202-40a6-84e3-83f3ceb57a99"

Example 2: "CredentialID": "0001"


CredentialName

Data Type: String

Applies To: Most object types that support credentials

Description: The name of the credential that is assigned to this object.

Example: "CredentialName": "Administrator"


Username

Data Type: String

Applies To: All object types that support credentials, Credential

Description: The username of this object.

Example: "Username": "administrator"


Password

Data Type: String

Applies To: All object types that support credentials, Credential

Description: The password of this object.

Example: "Password": "!dfhe8yr498hh@"



To assign a credential via its ID you obviously will first have to find the credential's ID. The best way to do that is not by trying to find the ID in the source of the rtsz file but via the folder dashboard. Here's how:

  • Select the Overview/Dashboard tab in Royal TSX
  • If you're not in "Dashboard" mode, go to "View - Switch to Dashboard"
  • Control/Right-Click the table view's header and select "Choose Columns - ID" to add the "ID" column if it hasn't been added already
  • In the navigation panel select the folder containing the credential you want to reference
  • Locate the credential in the table view and note its ID
  • In your RoyalJSON you can now use the "CredentialID" property to reference this credential
  • Alternatively you can use the "CredentialName" property to reference your credential by name


Regarding properties that are not exposed via RoyalJSON:


We designed RoyalJSON to be easy to compose for users without knowledge of our underlying data model. Because of this, we only added wrappers for the most common properties in RoyalJSON. RDP Drive redirection settings are not available at the moment. If you'd like to see this or other properties supported in a future update, please file separate feature requests in our forums.

That being said, there's a way to access the RoyalDocument source properties directly but it requires knowledge of our RoyalDocument data model. Here's another excerpt from our documentation:


Properties

Data Type: Key/Value pairs

Applies To: All object types

Description: Can be used to specify properties of the object that aren't exposed in the RoyalJSON object model. To be able to use this, knowledge of the RoyalDocument data model is required.

Example: "Properties": { "IsExpanded": "True" }


So via the "Properties" key you can access every RoyalDocument model property in existence but there's no magic parsing for any of them like for natively supported RoyalJSON properties. Here's an example rJSON that creates two RDP connections, each of them having drive redirection enabled. The first one redirects the home directory while the second one redirects a custom path ("/Applications" in the sample):


{
  "Objects": [
    {
      "Type": "RemoteDesktopConnection",
      "Name": "Redirect home dir",
      "ComputerName": "TODO",
      "Properties": {
        "RedirectDrives": "True",
        "Drives": "{HomeDirectory}"
      }
    },
    {
      "Type": "RemoteDesktopConnection",
      "Name": "Redirect custom dir",
      "ComputerName": "TODO",
      "Properties": {
        "RedirectDrives": "True",
        "Drives": "/Applications"
      }
    }
  ]
}


Hope that helps you get your dynamic folders set up as you want them!


Cheers and merry christmas,

felix

Hi Felix


I've now got CredentialName and the Drive Redirection stuff working, which is great! I'm super impressed by  Royal TSX! You really seem to have thought of everything.


I wasn't able to get CredentialID to work, and I've attached a minimal example reproducing the problem. Perhaps I'm doing it wrong?


In any case, using CredentialName is probably more convenient anyway.


Thanks again and Merry Christmas!

rtsz

Hi Matthew,


you're absolutely right, that's a bug.

I've already fixed this internally and the fix will roll out to users in the next update.


Sorry about that!


cheers,

felix

On a similar topic to this, is there a way to reference another object directly from and object?


E.g. A WebPage entry, and an SSH entry for the same device. But instead of filling in the details for each entry, setup one (WebPage) with description, Notes, etc. and reference them in any other entry of the same device (SSH). 

I.e. $WebPageReference.Description$


I know you can inherit from the parent folder, but having a separate folder for each device is cumbersome.

Login or Signup to post a comment