Currently there is no option as per this uservoice to delegate the MFA reset action to help desk team via an admin role. As of now only the global admin have the required privileges to perform this action from the azure portal. In this article we had a look into how to reset this option by creating an automation account and integrating with Microsoft Flow. Though this is a good option there is another way where this action can be delegated via ManageEngine AD manager plus.
Most of the organizations have AD Manager plus and its features integrated on their on premise tenant. This can be used to execute office 365 and Azure AD operations in a hybrid environment. In this article we will have a look at the steps to integrate AD manager plus with Azure AD to delegate this action to the help desk team.
Below are the prerequisites :
- AD manager plus server must be present in the hybrid domain. Not necessarily a hybrid domain it works well for cloud only accounts as well.
- The connectivity to the Azure IPs and URLs are required to connect azure module connect-msolservice
- Azure AD modules must be downloaded on the AD manager plus server.
- AD delegation must be already assigned to the help desk team with AD management role.
- Global admin account is required to specify them as encrypted credentials with key on the AD manager plus server. This global admin account will only be used by the manage engine AD manager server in the backend and not exposed to the helpdesk team.
First we need to create the encrypted credentials and key . Below command can be used.Kindly note that if we try to execute with plain text password it will not work, Since in our case we are doing an invoke session from AD manager plus and hence it works only with key file.
A very important note here is if there is a password policy for the global admin accounts, ensure to regenerate this key by re-running this script once after the new password is changed on the Global admin account.
$KeyFile = "Z:\ManageEngine\ADManager Plus\bin\AES256.key" $Key = New-Object Byte 32 $Key | out-file $KeyFile $credential = Get-Credential $credential.Password | ConvertFrom-SecureString -Key $Key | Out-File "C:\ManageEngine\ADManager Plus\bin\credential.cred"
Later place this script on the AD manager plus bin folder as .ps1.
Connect-MsolService -Credential $cred "`nConnected to MSOL" | Out-File $MFAlog -Append Set-MsolUser -UserprincipalName $userPrincipalName -StrongAuthenticationMethod @() "`nUpdated User $userprincipalname" | Out-File $MFAlog -Append
The above script will also generate MFAActions.log file in the bin folder which will help us to track the MFA actions performed via AD manager by the help desk admins. Even this script must be placed in the bin folder in the AD manager plus server.
Now having done the Azure AD part we need to access Manage Engine AD Manager Plus admin portal and perform the below action:
- Go to AD Mgmt – User Modification Templates – Click Create New Template.
- Leave all the fields on all the tabs as default – Navigate to Custom Attributes – Select Run Custom Script on successful user modification script command: add the below format to call our script via AD manager plus – PowerShell -File mfa.ps1 %userprincipalname%
- Once done click on save template.
- Assign this template to the helpdesk team.
Once this above action is completed help desk can reset via below method –
AD mgmt – Modify Single user – Search for affected user – Modify user – Change template – Choose MFA reset template – then click on update user.
Now the MFA value will be cleared for the requested user.
We can also check the status from Azure AD connected Powershell
(Get-MSOlUser -UserPrincipalName firstname.lastname@example.org).strongauthenticationmethods
The value should return null for a user where the MFA reset is successful.
This action will help in achieving the delegation of MFA reset via manage engine. Helpdesk admins can for perform the MFA reset through the manage engine delegated help desk portal by selecting the assigned template and can perform this action.
Thanks & Regards
Leave a Reply