Security Compliance

How to add FileShare homeDirectory within ARM Template

This KB article explains how to add include the server path (\\SERVER\PATH\) and then add the {samaccountname} variable behind this path within LDAP Attribute homeDirectory in ARM template

First published date

10/21/2019 10:04 AM

Last published date

6/27/2025 10:39 AM

Overview

When creating LDAP attributes and accounts, sometimes it is needed to include homeDirectory attribute and within that attribute to include server path to the File Share and within that path include correct {samaccountname} for this particular user. This article explains the TextField that needs to be used to achieve this feature.

Product section

Access Rights Manager

Resolution

To achieve this, please insert the below within your ARM template:

{
        "Name": "homeDirectory",
        "Definition": {
          "Type": "TextField",
          "Label": "homeDirectory",
          "Description": "Home Directory",
          "Constraints": {
                  "CreationRule": "\\\\\\\\fileserver\\\\USER\\\\{samaccountname}"
          }
        }
 },


NOTE:
The path in CreationRule must be set this way so every single \ in the UNC must be replaced with \\\\ (four) characters since the value will run through two engines and the \ must be escaped twice that way (so basically you escape the second escape \ so it will reach the second engine).