Tag Archive: Exchange


Microsoft / Office365 Impersonation Bug

We use an off the shelf product at work which can send e-mails. The e-mails come from the currently logged in user and the way this is achieved is by using Exchange Web Services. The code probably looks something along the lines of;

ExchangeService service = new ExchangeService();
service.Credentials = new WebCredentials("impersonationusername@domain.com", "password", "");
service.UseDefaultCredentials = false;
service.AutodiscoverUrl(from, new AutodiscoverRedirectionUrlValidationCallback(RedirectionUrlValidationCallback));
service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.PrincipalName, "sender");
EmailMessage email = new EmailMessage(service);
email.ToRecipients.Add("recipient");
email.Subject = "subject";
email.Send();

Our e-mail provider is Office365 and recently some users have been unable to send e-mails from this product. We followed the usual troubleshooting process and were pretty convinced we had ruled out everything at our end. On top of this we used the Microsoft Remote Connectivity Analyzer (https://testconnectivity.microsoft.com) which was giving the same result;

ExchangeImpersonation SOAP header must not exist for this type of OAuth token

We haven’t made any changes to the mailboxes recently and they were previously working so it must be an issue Microsoft’s end. We logged a ticket and a week of back and forth later we have a solution (via powershell);

1. Set-ExecutionPolicy RemoteSigned
2. $UserCredential = Get-Credential
3. $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
4. Import-PSSession $Session
5. New-MoveRequest -Identity "impersonationusername@domain.com"

You can check the status of the execution of this command by:
Get-MoveRequest -Identity "impersonationusername@domain.com"

Microsoft were unable to provide a real reason for this other- but said something along the lines of; “something has become corrupt and moving the impersonation mailbox to a different database causes some form of rebuild”.

I hope this works for you too!

Office 365

I was previously using 4Smartphone to provide my hosted exchange server but read an article about Microsoft’s oferring: Microsoft Office 365, so thought i best take a look!

I have been trialling the product for just under a month and have decided to purchase a license! In short- Office365 encompasses a lot more than just hosted exchange (lync/ocs, sharepoint etc) and the cost is less than 4Smartphone (£4/month vs. $11.95/month).

The mailbox migration was really straightforward: I simply exported a .pst file using Outlook 2010 (connected to 4Smartphone) then imported the same .pst file in Outlook 2010 whilst connected to Office365.

Lync (what used to be OCS) seems to work well and allows federation with other companies, hosted or otherwise.

Give it a try!

L

Lack of recent updates… will try and push a load through today! Starting with a quick one as I’ve done this 2 or 3 times now and always have to search for hours to find the solution…

Outlook 2011 on the Mac doesn’t connect to exchange in the usual manner (and I don’t think it can connect to exchange pre-2007 at all). For 4smartphone (exchange server 2007) outlook 2011 uses a web connection and is configured as in the screenshot below:

So all you need are:
-Your e-mail address
-Your password
-Your server number (amend the following address to match yours)

https://owa016.msoutlookonline.net/EWS/Exchange.asmx

I hope this helps someone!

L

%d bloggers like this: