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 (2.0k points)

1 Answer

0 votes
by (294k 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
0 answers

Upgraded to the latest adaxes release yesterday and now this morning we are not able to access our self-service portal. We have rebooted our server and verified our adaxes service is successfully connected our domains. Any help would be appreciated, thank you!

asked Mar 14 by dhodgin (40 points)
0 votes
1 answer

I'm new to the platform, so please bare with me. I'm working on business rule that checks for accounts in our new users OU to see if MFA is enabled. I have an ... Stack trace: at <S criptBlock>, <No file>: line 12 Any help would be wonderful!

asked Jul 28, 2023 by thatcher (120 points)
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)
3,589 questions
3,278 answers
8,303 comments
548,105 users