0 votes

We need an regex expression that will take the last four digits of the mobile phone attribute and put in custom attribute. Right now we have a business rule below and it pulls the first four digits and not the last four.

Please advise.

by (3.2k points)

1 Answer

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

Hello,

You will need to use a PowerShell script for this purpose. To update your Business Rule accordingly:

  1. Launch Adaxes Administration Console.

  2. In the Console Tree, expand the service node.

  3. Navigate to Configuration/Business Rules and select the rule you need.

  4. In the Result Pane on the right, double click the Modify the User action.

  5. Select Run a program or PowerShell script.

  6. Paste the script below into the Script field.

     $mobile = $Context.TargetObject.Get("mobile")
    
     $mobileFour = $mobile.SubString($mobile.Length - 4)
     $Context.TargetObject.Put("adm-CustomAttributeText15", $mobileFour)
     $Context.TargetObject.SetInfo()
  7. Enter a short description.

  8. Click OK and save the changes.

Related questions

0 votes
1 answer

What specific permission is needed in a security role to grant access to enable a user account?

asked Dec 7, 2023 by mightycabal (1.0k points)
0 votes
1 answer

The Adaxes service account is a global admin, and we have already granted audit reporting to look for the lockout events, but I cannot pull the logs via the Adaxes service. I am ... enterprise app to pull this data? Or is there a better way to find this info.

asked Apr 21, 2023 by DA-symplr (100 points)
0 votes
1 answer

what version of powershell is needed with modern auth and connect to 0365/azure

asked Sep 30, 2022 by sra98a (120 points)
0 votes
1 answer

Currently getting this error when enabling a user for Skype for Business: No cmdlets have been authorized for use by the RBAC role that the user belongs ... minimum required permissions that the Adaxes account needs to manage Skype for Business functionality?

asked Dec 16, 2021 by thedoo (60 points)
0 votes
1 answer

We originally installed Adaxes and assigned the Adaxes Service user to the Domain Admins group. We are now locking down that group and have removed the Adaxes Serivce from ... to do things. What rights does Adaxes Service need in order to administer users?

asked Jul 23, 2021 by cobaltcu (20 points)
3,553 questions
3,243 answers
8,245 comments
547,831 users