I need to connect to Exchange Online using specific service principal, but I am getting error image.png

I am trying to authenticate via Connect-ExchangeOnline -AccessToken $token -Organization $organization

We have latest Adaxes version installed btw aka 3.8.0 version of the ExchangeOnlineManagement module is used automatically.

by (1.0k points)

1 Answer

by (307k points)
0 votes

Hello,

Unfortunately, there is no such possibility. Using method $Context.CloudServices.ConnectExchangeOnline() is the only option in Adaxes scripts. However, thank you for the suggestion. We forwarded it to the corresponding department for consideration.

by (307k points)
0

Hello,

Also, try the below command in both Windows PowerShell and PowerShell 7. Does it give the same results?

Get-Module ExchangeOnlineManagement -listavailable
by (1.0k points)
0

There was 3.6.0 version. I have deleted it and restarted Adaxes services.

Now no ExchangeOnlineManagement is detected in desktop nor core powershell, but I am getting still the same error.image.png

by (307k points)
0

Hello,

It looks like Adaxes is unable to install the module automatically. You can do it manually using the below command.

Install-Module -Name ExchangeOnlineManagement -RequiredVersion 3.8.0 

After the installation, restart the Softerra Adaxes Service Windows service.

by (1.0k points)
0

I have tried to explicitly import installed 3.8.0 version but no difference.

Anyway I can see that the Adaxes builtin EXO module is being imported image.png

So I don't think this is the problem here.

(the output is retrieved via command get-module | foreach {Write-Warning "$($_.Name) $($_.Version) $($_.Path)"} and is made before the exo auth occurs)

by (307k points)
0

Hello,

Do we understand correctly that you face the error after clicking Generate for the report with the script?

Are you able to view properties of Exchange Online recipients in Adaxes via the UI? For example, by just opening properties of a user in the Administration console and activating the Exchange tab.

Related questions

I'd like to run code against the Adaxes service but need to pass my Admin credentials. How do I send different creds than the current user?

asked Jul 27, 2020 by ComputerHabit (810 points)
0 votes
1 answer

The script create two reports of inactive workstation operating systems. The report is too detailed to run from one of the adaxes reports. Basically how can I set the script up to ... sure How I did this but I can't find it now (probably something simple).

asked Nov 30, 2022 by mightycabal (1.2k points)
0 votes
1 answer

How do I setup Adaxes for Exchange Online Hybrid mode? When I look at one of the users that has been migrated to Exchange Online I get the message of The operation couldn't be performed because object couldn't be found on domain controller.

asked Dec 5, 2019 by Lucas.Miller (20 points)
0 votes
1 answer

Hi, In the SDK I find information on how to use Powershell to read and create scripts in custom commands and business rules, but I can not find the same for ... information like the embedded scripts for the report and custom columns? -- Morten A. Steien

asked Jul 27, 2023 by Morten A. Steien (300 points)
0 votes
1 answer

The checkbox is not selected (False) by default.

asked May 30, 2022 by john.harding (70 points)
0 votes
1 answer