0 votes

Hello *,

I have a very special problem.
Our user objects have a multiline value attribute.
In this attribute the drive connection are saved, for example:
entrytype ; letter ; unc ; description
networkdrive;M:;=\\myserver\myshare;mydescription

As we are introducing Adaxes for that domain I have the problem to edit that.
Is there any way to give the users a form for editing those entries?
Like "New drive mapping" -> Choose Letter -> Choose drive (Fileshare object from AD) -> Description filled (from that fileshare object)

So editing the values is simple if you do that directly with the specific format but I would like to give the users a more comfortable way to do that.

I can't use GPP drive mappings for that as we're talking about more than 1000 shares and we need the possiblity of a flexible mapping of them to letters per user.
Actually the attribute is taken by a login script and connects those drives.

Thanks in advance!

by (200 points)
0

Hello,

What version of Adaxes are you currently using? To check that:

  1. Launch Adaxes Administration Console.
  2. Right-click your service.
  3. Click Properties in the context menu.
  4. Adaxes version is displayed on the General tab.
0

Currently 3.9.15521.0 but an update would not be a problem.

Edit: Upgrade done to 3.9.15631.0

1 Answer

0 votes
by (294k points)
selected by
Best answer

Hello,

Thank you for specifying. The solution will include the Modify User Action and a Business Rule triggering After Updating a User. The action form will contain two custom text attributes (e.g. CustomAttributeText1 and CustomAttributeText2) and a DN syntax property (e.g. Assistant). Custom attributes will be used to specify the entry type and letter while the Assistant property will be used to specify a File Share. The Business Rule will trigger only when one of the properties is updated and execute a PowerShell script to put the property values into the multi-line property.

i. Creating the Action

  1. Open Adaxes Web Interface Configurator.
  2. In the top left corner, select the Web Interface you need.
  3. In the Actions section, click Add.
  4. Select Modify User and click Next three times.
  5. Select Use customized form and click Customize form.
  6. Remove all the sections except for one (e.g. General).
  7. Remove all the properties from the Fields section and click Add below.
  8. Select CustomAttributeText1 and click OK.
  9. Below the Fields section, click Add .
  10. Select CustomAttributeText2 and click OK.
  11. Below the Fields section, click Add again.
  12. Select Assistant and click OK.
  13. In the dialog box that opens, clear the checkboxes for all Object types and click More object types.
  14. Select the Volume Object type and click OK three times.
  15. Click Finish.

For information on how to specify custom display names for the properties, see https://www.adaxes.com/help/?HowDoI.Man ... Names.html.
For information on how to change icons for object types, see https://www.adaxes.com/help/?HowDoI.Con ... Types.html.

ii. Creating the Business Rule

  1. Launch Adaxes Administration Console.

  2. In the Console Tree, right-click your service node.

  3. In the context menu, navigate to New and click Business Rule.

  4. On step 2 of the Create Business Rule wizard, select User Object type.

  5. Select After Updating a User and click Next.

  6. Click Add an action and click OK (do not select any action).

  7. Double-click the operation succeeded.

  8. Select failed and click OK.

  9. Right-click the updated condition and click Add New Condition in the context menu.

  10. Select If operation <result>.

  11. Select suspended and click OK.

  12. Click the AND logical operator (it will change to OR).

  13. Right-click the operation failed and click Add Else If in the context menu.

  14. Double-click Do nothing in the Else if block.

  15. Select Run a program or PowerShell script.

  16. Paste the below script into the Script field.
    In the script:

    • $multilineAttribute – Specifies the LDAP name of the multi-line property (e.g. department);
    • $entryTypeAttributeName - Specifies the LDAP name of the property storing the entry type ( e.g. adm-CustomAttributeText1);
    • $leterAttributeName - Specifies the LDAP name of the property storing the drive letter ( e.g. adm-CustomAttributeText2);
    • $fileShareDNAttributeName - Specifies the LDAP name of the property storing the file share (e.g. assistant).
     $multilineAttribute = "description" # TODO: modify me
     $entryTypeAttributeName = "adm-CustomAttributeText1" # TODO: modify me
     $letterAttributeName = "adm-CustomAttributeText2" # TODO: modify me
     $fileShareDNAttributeName = "assistant" # TODO: modify me
    
     function GetPropertyValue ($propertyName, $object)
     {
         try
         {
             $value = $object.Get($propertyName)
         }
         catch
         {
             $value = $NULL
         }
    
         return $value
     }
    
     function BuildMultilineString ($value, $multilineString)
     {
         if ($value -eq $NULL)
         {
             return
         }
         [void]$multilineString.AppendLine($value)
     }
    
     # Get property values
     $entryType = GetPropertyValue $entryTypeAttributeName $Context.TargetObject
     $leter = GetPropertyValue $letterAttributeName $Context.TargetObject
     $fileShareDN = GetPropertyValue $fileShareDNAttributeName $Context.TargetObject
    
     # Get file share unc path
     if ($fileShareDN -eq $NULL)
     {
         $fileShareUncPath = $NULL
         $fileShareDescription = $NULL
     }
     else
     {
         $fileShare = $Context.BindToObjectByDN($fileShareDN)
         $fileShareUncPath = GetPropertyValue "uNCName" $fileShare
         $fileShareDescription = GetPropertyValue "description" $fileShare
     }
    
     # Build multi-line string
     $multilineString = New-Object "System.Text.StringBuilder"
     BuildMultilineString $entryType $multilineString
     BuildMultilineString $leter $multilineString
     BuildMultilineString $fileShareUncPath $multilineString
     BuildMultilineString $fileShareDescription $multilineString
    
     # Update user
     if ($multilineString.Length -eq 0)
     {
         $Context.TargetObject.Put($multilineAttribute, $NULL)
     }
     else
     {
         $Context.TargetObject.Put($multilineAttribute, $multilineString.ToString())
     }
     $Context.TargetObject.SetInfo()
  17. Enter a short description and click OK.

  18. Double-click no condition in the Else if block.

  19. Select If <property> changed.

  20. Select If CustomAttributeText1 has changed and click OK.

  21. Right-click the condition you created and click Add New Condition in the context menu.

  22. Select If <property> changed.

  23. Select If CustomAttributeText2 has changed and click OK.

  24. Repeat steps 21-23 for the Assistant property.

  25. Click the AND logical operator (it will change to OR).

  26. Click Next and finish creating the Business Rule. You should have something like the following:

0

Hey Support,

that's works fine. I have to do some adjustments but thanks for pointing in the right direction!
Great work!

Related questions

0 votes
1 answer

Hi I'm testing 2023 and have noticed that the admin console keeps grabbing memory. This seems to be happening when editing powershell scripts in scheduled tasks ... $purpose = Get-UnifiedGroup -Identity Disconnect-ExchangeOnline Is this a known problem? Matt

asked Nov 30, 2022 by chappers77 (2.0k points)
0 votes
0 answers

Is it possible to do something such as this: When creating a user in the web interface, setup the form so that certain fields have a dropdown list of available values, ... "department", they would see a dropdown list of pre-populate options to choose from.

asked Aug 11, 2016 by HDClown (220 points)
0 votes
1 answer

Good Afternoon, I have been looking through the forums and I might have missed it, but here's what I'm looking to do I currently have a business rule that is being ... another set of different conditions. Let me know if I need to explain my request further.

asked May 12, 2014 by jtop (700 points)
0 votes
1 answer

We are wanting to display all values entered into a multi value text attribute in an email sent by Adaxes. What we've found is that only the first entry into the array ... Entry" Is there a way to reference the variable so that it displays all entries? Thanks

asked 6 days ago by msheppard (610 points)
0 votes
1 answer

Is there a way to configure a Custom Command parameter to accept multiple values so I can then add them to a multi value attribute such as adm-CustomAttributeObjectMultiValue1 ... in my specific case I'm looking to use a directory object picker parameter

asked Nov 27 by AM (50 points)
3,587 questions
3,275 answers
8,300 comments
548,047 users