Microsoft.Xrm.Data.PowerShell icon indicating copy to clipboard operation
Microsoft.Xrm.Data.PowerShell copied to clipboard

Mail Activation doesn't work with global admin

Open jdefr42x opened this issue 3 years ago • 3 comments

Hi !

I have a problem with the approval of mailboxes. No error message, but variable isemailaddressapprovedbyo365admin does not change. No problem with same account from GUI. (note : our dynamics is in french)

$User = Get-CrmRecords -EntityLogicalName systemuser -FilterAttribute domainname -FilterOperator "eq" -FilterValue $emailAddress -Fields * -WarningAction Continue -ErrorAction Stop
$UserId = $User.systemuserid
Approve-CrmEmailAddress -UserId $UserId
or
Set-CrmUserMailbox -UserId $UserId -StateCode Actif -StatusCode Actif -ScheduleTest -ApproveEmail

jdefr42x avatar Jun 24 '22 13:06 jdefr42x

@jdefr42 sorry for the delay your issue slipped by an I didn't notice, I'm not aware of any issue with this though, I'm a little limited in terms of what I can easily test, in the past as long as the user was an exchange admin or global admin this would function and I know there was a previous issue logged where we had someone trying to get it working with a service principal instead that you could look for in the issue history.

Mailbox approval has always had some quirks and has changed, as you can imagine there is a lot of careful consideration our engineering team takes into account with regard to mailbox/email address approval as it could have consequences if people without the right permissions were able to approve an email address. I would expect the API calls to behave the same for the UI (which is typically the situation) though it's possible there was a change in the API. If you did wind up figuring it out or opened a support case to figure it out please let me know. Thanks!

seanmcne avatar Oct 25 '22 13:10 seanmcne

Thank you for your comeback

jdefr42x avatar Oct 27 '22 06:10 jdefr42x

@jdefr42 I just noticed it looks like the documentation was updated (a couple months back) for changes which are being made to the process - what I noticed just now was the flag saying there are changes rolling out so we might want to keep an eye on this article to see how it evolves.

https://learn.microsoft.com/en-us/power-platform/admin/connect-exchange-online#approve-email

image

seanmcne avatar Oct 27 '22 15:10 seanmcne

Looks like the docs were updated with the version #'s https://learn.microsoft.com/en-us/power-platform/admin/connect-exchange-online#delegate-mailbox-approval

seanmcne avatar Nov 15 '22 15:11 seanmcne