Random tech posts

Menu

Skydrive, OAuth and Live account hell.

I’ve started to try and integrate Skydrive access into AzureCopy and have learned a number of important lessons, mainly around OAuth. I’ve often dabbled in OAuth, partially knowing what I’m doing, partially copying examples and partially good luck.

AzureCopy is a command line tool, but performing the “OAuth Dance” seems to always require a browser. This browser step should only ever be required to get the refresh token (well strictly speaking the “code” which can be used to get the refresh token). Until I figure out how to get command line apps to work properly with OAuth I’m going to leave this in a semi-completed state.

For now, I’ll be leaving Skydrive integration in “extreme beta” which means you have to know what you’re doing and get your refresh token manually. The steps to do so are:

3) Copy the value of the code parameter and paste into the azurecopy.exe.config entry in the “SkyDriveCode” tag.

4) Use AzureCopy via command line as usual, now you’ll be able to use skydrive for source/destination.

AzureCopy will then retrieve a RefreshToken from SkyDrive and request fresh AccessTokens per session. Currently this is source only and not in any released binaries, but is definitely moving along. Once I’ve finished this I think I’ll target RackSpace or DropBox…