-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue activating mailbox using service principal in Azure Automation #454
Comments
To approve a mailbox I we have historically required an account have the Global Admin role to approve. I would suggest taking a look at any feedback that is currently out there around this topic and if not, please create a feedback item. I think other customers have expressed the desire to automate this function or enable users who are not necessarily global admins to approve and this is another good example. |
Thanks Sean. Based on the doc, looks like Exchange admin with System admin role can approve email address but you might be right, it does require Global admin rights to activate the mailbox.
|
Unfortunately I'm not sure why the API doesn't return an error, I don't recall an error being thrown if a user who is not a global admin tries to activate a mailbox using powershell. In the webUI it shows the result of the activation attempt, but I think when scheduling a test/enable with powershell you also need to query the mailbox again to see if anything happened (success or failure). |
thanks to this article, found the missing step for my issue. basically, i needed to assign additional Exchange.ManageAsApp API permission in my service principal and apparently you can't do that through UI and can only be done from powershell :(
|
Excellent! I didn't even realize that was an option - this is super helpful/valuable! |
Trying to achieve:
I am trying to setup Azure Automation account with script to be able to activate user's mailbox account. I am trying to use Service Principal which gets created as 'Run As' account to connect to CRM and activate the mailbox. At the end, i am trying to invoke this Azure Automation runbook from Power Automate with the parameters of 'CRM Instance URL' and 'User Email Address'. Whenever we need to activate user's mailbox, we will then execute Power Automate, pass in CRM instance url and user email address, which will invoke Azure Automation, use service principal to authenticate against crm and activate the email address.
Issue:
The issue i am running into is, i am unable to activate the mailbox using the client secret connection. It executes but even though it fails to activate mailbox (verified by going to crm and checking user's mailbox), it doesn't throw any error message. I can replicate this behavior both in Azure Automation and locally using the client-secret.
Steps To replicate:
If you run the same script locally, you will see the same behavior.
Any suggestion what i am doing wrong here?
Sanjeev
The text was updated successfully, but these errors were encountered: