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 (110 points)

1 Answer

+1 vote
by (5k 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

We have a process that when a new user is created they are emailed their username and apssword. If the user is in an Admin Group they are then sent an email with some PDFs ... you can send emails, but am unable to see where it could attach files to the email?

asked Sep 3, 2020 by dknapp (100 points)
0 votes
1 answer

We used to run AD Audit and it would provide additional details on what was locking a user's account (workstation name, application, etc...). Is there are way with Adaxes ... on what is locking an account? Or a way to pull historical data on locked accounts?

asked Nov 16, 2020 by pulsifers (20 points)
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 (1.1k points)
0 votes
1 answer

Is there a way to get the name of the user who approved a request and supply that to a step inside of a custom command? For example, HR submits a status change for an employee. ... and pass it as a param in a custom command that is called in one of the steps?

asked May 12 by davfount90 (20 points)
0 votes
0 answers

I noticed that other identity management solutions have a way for new user to claim their account. This would be helpful so we can help all of our new students (who do not ... ) claim their account and reduce the burden on our help desk. Thanks for your help.

asked Aug 29, 2020 by rmedeiros (360 points)
2,492 questions
2,239 answers
6,011 comments
411,119 users