0 votes

Hi

We're testing Adaxes 2023 and I've found a small issue when connecting to AzureADPreview in a powershell script where it comeas back with the following: "One or more errors occurred.: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation."

The script connects using the follwing commands

$cred = $Context.GetOffice365Credential()
Import-Module AzureADPreview
Connect-AzureAD -Credential $cred

This is working in our live 2021.1 environment and I'm assuming the issue is that the 2023 system is using the app registration for Azure rather than a service account with Azure permissions.

How can this be done with the app registration?

Thanks

Matt

by (1.6k points)

1 Answer

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

Hello Matt,

The behavior is expected and is not related to versions. It is about the account used to register your Microsoft 365 tenant in Adaxes. The approach you have will work in Adaxes 2023 as well if you register your tenant with credentials of a user account. In case when you tenant is registered with credentials of an Azure AD app, you need to use a different approach.

For your information, Azure AD PowerShell is planned for deprecation. As such, it is not recommended to use it in scripts. Also, Microsoft has already started disabling basic authentication in Microsoft 365 tenants, so specifying user credentials will soon stop working. For examples of the corresponding scripts, have a look at the following SDK article: https://adaxes.com/sdk/CloudServicesScriptContextClass.

0

Thanks for the information, I'll get our scripts updated.

Re that link, it seems to suggest that we could connect an exchangeonline session without needing to install the powershell module, is that right?

Matt

0

Hello Matt,

Yes, that is correct.

0

That's brilliant, you guys are awesome.

0

A quick follow on if I can, in the example where you're connecting to PnPOnline, the connection string includes a certificate thumbprint. Would this be the thumbprint of a certificate on the Adaxes server, uploaded to the Azure app?

0

Hello Matt,

Yes, that is correct. You can check the following article in our repository for more details: https://www.adaxes.com/script-repository/grant-full-access-to-user-one-drive-s520.htm.

Related questions

0 votes
1 answer

Hi Adax users are unable to load any exchange information when using the Adaxes front end. When trying to load exchange information or any exchange related task they get the ... tenants is set up and says last AD Connect time was 30 minutes ago. Thanks

asked Feb 16, 2021 by R_C (70 points)
0 votes
2 answers

Dear Support, can you advise if it's possible to connect to Adaxes from PowerBI? To have access (read) for the Adaxes custom attributes? Thank you!

asked May 13, 2020 by Dmytro.Rudyi (920 points)
0 votes
1 answer

Dear Support, can you please clarify - to call adaxes custom commands from "other" machines via following code - Adaxes PS module needs to be installed or ... -Object "Softerra.Adaxes.Adsi.AdmNamespace" $admService = $admNS.GetServiceDirectly("xxx") Thanks!

asked Oct 9, 2019 by Dmytro.Rudyi (920 points)
0 votes
1 answer

I am trying to configure Adaxes to talk to my O365 Tenant. Following the guide here - https://www.adaxes.com/tutorials_Active ... ice365.htm - I am getting stuck on the ... the same rights that I have set on the service account) Is anybody able to help?

asked Jun 13, 2019 by lucaswhizz (50 points)
0 votes
1 answer

Hello, We have an exchange server in a separate forest. When we create the mailbox using a business rule after user creation, the mailbox creates ok. After the user ... multi-forest environment and it made no difference. Thanks for any help you can provide.

asked Nov 2, 2018 by Jasonmh (540 points)
3,071 questions
2,784 answers
7,155 comments
436,695 users