0 votes

Hi all,

Am trying to convert a mailbox from a user box to a shared box in O365. Have been for the past few weeks even. The Adaxes tutorials error out, and I am not sure if Adaxes has permissions to run commands on 365.

My boss who set up Adaxes is pretty sure it should be using the ADSync account for 365 related commands, but I am not sure it is doing this. The tenant is present under Adaxes in the 'cloud services' section, and the admin account is listed as the Adsync account.

I'm trying the script here - https://www.adaxes.com/script-repository/convert-user-mailbox-to-resource-mailbox-in-exchange-online-s160.htm

However the script errors with "Connecting to the remote server outlook.office365.com failed with the following error message: Access is denied".

I presume it is having problems with this - $Context.GetOffice365Credential() But I do not know how to tell what this function is calling or pointing at. I don't know if it's trying to use the Adaxes service account, or the ADsync account.

I have checked the Adaxes SDK but it does not say what account the method points at - http://www.adaxes.com/sdk/?ExecuteScriptContextClass.html#executescriptcontext_getoffice365credential

by (290 points)

1 Answer

+1 vote
by (2.6k points)
selected by
Best answer

Hello,

The Adaxes tutorials error out, and I am not sure if Adaxes has permissions to run commands on 365.

Please, clarify what you mean by tutorials error out. If you face any errors, please, post here or send us (support[at]softerra.com) screenshots of the errors and specify where you face them.

However the script errors with "Connecting to the remote server outlook.office365.com failed with the following error message: Access is denied".

Please, make sure the account used to register your Office 365 tenant in Adaxes is assigned to either the Global Administrator or both the User Management Administrator and Exchange Administrator roles in Office 365. To check/change the account:

  1. Launch Adaxes Administration Console.
  2. In the Console Tree, expand your service node.
  3. Navigate to Configuration/Cloud Services and select Office 365. image.png
  4. In the Result Pane on the right, select the Office 365 tenant.
  5. Click Edit. image.png
  6. Activate the Admin Account tab. The account username will be displayed in the corresponding field below. image.png

If the account is assigned to either of the roles, please, check whether the Basic authentication is enabled in Exchange Online for the account. If it is disabled, to connect to Exchange Online you need to use a different approach. For an example of the script that connects to Exchange Online using the approach, have a look at the Exchange Online using EXO V2 module script on the following repository page: https://www.adaxes.com/script-repository/connect-to-exchange-with-powershell-s506.htm. Important: to use the script, install the EXO V2 PowerShell module on the computer where Adaxes service is running.

I presume it is having problems with this - $Context.GetOffice365Credential() But I do not know how to tell what this function is calling or pointing at. I don't know if it's trying to use the Adaxes service account, or the ADsync account.

The $Context.GetOffice365Credential method returns credentials of the account used to register an Office 365 tenant in Adaxes that is associated with the object for which the script is executed.

Related questions

0 votes
1 answer

Hello, I have a simple custom command that need to update the ProfilePath of Remote Desktop Services only if the current Profilepath starts with a specific value. I use the If ... the result is never true so the value is not updated. Thanks in advance. Ten

asked Dec 3, 2019 by tentaal (5.4k points)
0 votes
1 answer

is it possible to allow a user to enroll for both options, or even only one option out of the two available? I would like to give my users the choice to use either. Some users may not want an authenticator, but other's might do.

asked Nov 6, 2019 by mashworth (290 points)
0 votes
1 answer

Hi, I'm currently facing a problem where I want to set up a powershell script that should report all accounts (enabled, disabled, expired) matching a specific employeeType ... something else, just the plain Info Can you help me with this? kind regards Ingemar

asked Sep 4, 2015 by ijacob (6.1k points)
0 votes
1 answer

Hi, I followed this example: https://www.adaxes.com/sdk/IAdmTop6.html, but because the Custom Command is disabled, I get the following error message: System.Management.Automation ... if I enable the Custom Command. I am using Adaxes 2018.2 Best Regards Martin

asked Feb 19 by Martin (280 points)
0 votes
1 answer

Is it possible to call execution of Adaxes custom command via SPML?

asked Oct 16, 2019 by Dmytro.Rudyi (2.8k points)
2,135 questions
1,900 answers
5,319 comments
3,535 users