Today, I was tasked with debugging an issue someone at work had been having - we've built some stuff that needs to connect to a SharePoint Online instance from within an Azure Worker role, and whilst it worked locally, when it was run in the cloud, it continually caused the role to error out.
To connect, we're grabbing the claims-based cookies (for which you can read Chris Johnson's post about it) and using those to authenticate and it worked on the local DevFabric.
Here's the gotcha though - for your Azure Role, make sure you include the Microsoft.IdentityModel assembly that comes with WIF as a reference, and ensure it is set to Copy Local. The claims based stuff needs WIF to function, and doesn't come on Azure roles by default, though it may in the future...
But in the meantime, that's one more thing to check if you're getting the dreaded "CannotContactSite" ClientRequestException in the EnsureFormDigest() method call as part of the authentication procedure.