0 votes

I am trying to use this script from the script repository: https://www.adaxes.com/script-repository/enable-mfa-with-phone-number-for-a-user-in-microsoft-365-s686.htm

I have installed Microsoft Graph on the PC that is running the Adaxes Admin Console and have verified the installation, I'm not sure if I just didn't install it correctly because Adaxes Powershell doesn't recognize it.

by (60 points)

1 Answer

0 votes
by (289k points)

Hello,

That is incorrect. As it is mentioned in the script description, the module must be installed on the computer where Adaxes service runs, not on the one where the Administration console is installed. Also, it is a good idea to restart the service after installing the module.

0

My apologies, I didn't specify that I also run the Adaxes service on the same member server. I restarted it and I'm still getting the same issue.

0

Hello,

What command did you use for the module installation?

What exactly do you mean by Adaxes Powershell doesn't recognize it? pelase, describe the issue in all the possible details with live examples and screenshots.

Also, please, check whether the cmdlet is recognized in Windows PowerShell when starting with the credentials of the Adaxes service account (specified during Adaxes installation).

0

I used the follow command in Windows Powershell:

Install-Module Microsoft.Graph -Scope AllUsers

Using the following command, I can verify that Microsoft Graph is installed on this member server.

Get-InstalledModule Microsoft.Graph

image.png

When I run the following code using the "Run a program or PowerShell script" I get the execution error shown under:

image.png

image.png

I attempted to run it as both the service account and my domain admin account.

0

Hello,

As per our check the script should work just fine when the installation of the module is performed using the specified command. Most probably, there is something blocking access for the Adaxes service account to the module. To remedy the issue, try to do the following:

  1. Uninstall the Microsoft.Graph module.
  2. Log in to the computer where Adaxes service runs with the credentials of the Adaxes service account (specified during Adaxes installation).
  3. Install the module using the very same command.
  4. Verify that the corresponding cmdlets (e.g. Conenct-MgGraph) are available in Windows PowerShell.
  5. Restart Adaxes service.
  6. Check whether the issue persists.
0

Thank you, these steps resolved this issue in particular, but the script still isn't working because I was receiving the following error:

image.png

I found another article and after adding the following line to the script, it changed this error into another error, which is where I'm stuck now.

$token = $token | ConvertTo-SecureString -AsPlainText -Force

Below is the new error I'm receiving, do you know what may be causing it?

image.png

0

Hello,

The error is returned by Microsoft 365 and is not related to Adaxes or the script. Most probably, it has something to do with the Azure app lacking specific permissions. For more details, we recommend you to contact with Microsoft support.

0

Disregard. I figured it out.

Related questions

0 votes
0 answers

Over the last day or so we have been seeing this pop up under the exchange header in adaxes portal. cmdlet Get-CASMailbox is not present in the role definition of the current user

asked Jul 3, 2023 by Jeff.Briand (80 points)
0 votes
1 answer

Hello, I am scripting user creation. I have created a custom command where an end user will submit info for the user to be created from: Here is the scirpt: # Import the ... Schema. I have tried using "Employee Type" as in the screen shot above but same error.

asked Apr 6, 2023 by mightycabal (1.0k points)
0 votes
1 answer

Just wanted to know if we could: Change the name of "Rename" Hide it altogether from the user page We've created a custom rename comand would prefer to simplify the user interface.

asked 7 hours ago by msheppard (470 points)
0 votes
1 answer

I created a group Business Rule that triggers "After adding or removing a member from a group". On its Activity Scope I added a test group, and set it for "The group ... does not trigger. What should I do to make the BR detect this (admittedly rare) case?

asked Mar 16, 2023 by alex.vanderwoude (60 points)
0 votes
1 answer

Hello How can I use a script to search for "123France - Create" in the business rules and replace the "123France - Create" with "France - Update"? This would be an ... done throughout the CN=Business Rules. It will always be searched for "123France - Create".

asked Aug 25, 2023 by DRiVSSi (300 points)
3,548 questions
3,238 answers
8,232 comments
547,810 users