0 votes

We would like users to be able to add their mobile number and carrier information from within the web console.

Preferably, they would enter their mobile number in a text box, and select their carrier friendly name (Verizon, AT&T, T-Mobile, etc.) from a dropdown list.

Once entered, remove any special characters (parenthesis, spaces, hyphens, etc.), have the carrier friendly name be replaced by the email domain (@vtext.com, @txt.att.net, etc.) and would get concatenated to the number.

For example, if a user would enter "(800) 555-1212" in to a text box, and select "AT&T", the resulting address would be "8005551212@txt.att.net". This address would then be written to an extensionAttribute field in Active Directory.

by (1.1k points)
0

Please disregard this request. I was able to figure out how to do this on my own.

I accomplished this by using the adm-CustomAttributeText fields, and a Property Pattern to limit one of them to only the carrier names.

I then created a Business Rule to run a PowerShell Script if the CustomAttributes were changed (sorry I am not a coder so probably ugly)

Import-Module Adaxes

# Remove Parenthesis, Hyphens, and Spaces from Mobile Number
$Mobile = ($Context.TargetObject.Get("adm-CustomAttributeText2"))
$MobileMap =@{ "("=""; ")"=""; "-"="";" "=""; }
foreach ($MobileMapKey in $MobileMap.Keys) {$Mobile = $Mobile.Replace($MobileMapKey, $MobileMap[$MobileMapKey])}
$Context.SetModifiedPropertyValue(("adm-CustomAttributeText4"), $Mobile)

# Replace Carrier Name with Carrier Address
$Carrier = ($Context.TargetObject.Get("adm-CustomAttributeText3"))
$CarrierMap =@{ "AT&T"="@txt.att.net"; "Sprint"="@messaging.sprintpcs.com"; "T-Mobile"="@tmomail.net"; "Verizon - Personal"="@vtext.com"; "Virgin Mobile"="@vmobl.com"; "Mobi PCS"="@mobipcs.net"; }
foreach ($CarrierMapKey in $CarrierMap.Keys) {$Carrier = $Carrier.Replace($CarrierMapKey, $CarrierMap[$CarrierMapKey])}
$Context.SetModifiedPropertyValue(("adm-CustomAttributeText3"), $Carrier)

# Replace SMS Address
Set-ADMUser -Identity %username% -Replace @{extensionAttribute15 = $Mobile + $Carrier}

# Wait Timer to allow AD to update before page is refreshed
Start-Sleep -s 10

# Log Information
$Context.LogMessage(("SMS Address Updated") + ": " + $Mobile + $Carrier, "Information")

I then Customized the Display Names and Updated the Web Page to allow users to update their information.

Please log in or register to answer this question.

Related questions

0 votes
1 answer

I am evaluating Adaxes. I noticed that the web interface does not allow modification of the External Email Address (ms-Exch-Target-Address). What would someone do if they needed to change the Target Address?

asked Aug 6, 2020 by ComputerHabit (790 points)
0 votes
1 answer

Is it possible to grant selected user option to add custom license plan (or just subset of its licenses) to given user(s) using web interface?

asked Feb 28, 2023 by KIT (910 points)
0 votes
1 answer

Hi We would like to allow Managers of Users to add their Users to Security Groups. Currently, we always get the following error: Currently our Security for Managers looks like ... User XY can add UserXY to Group AB, then trigger the Business Rule Thanks, Mario

asked Jun 25, 2021 by m.car (80 points)
0 votes
1 answer

Hi All, I was following the following documentation https://www.adaxes.com/tutorials_DelegatingPermissions_GrantRightsToModifyADGroupMembership.htm However I cannot work out how to make it ... can only add themselves. Any help would be great. Many Thanks

asked Mar 30, 2020 by antondubek (440 points)
0 votes
1 answer

I would like to change department without a script just yet if possible on multiple accounts. If I cant do this then I will entertain custom script Thanks :)

asked Nov 23, 2021 by will17 (350 points)
3,326 questions
3,026 answers
7,727 comments
544,678 users