Office365 – Apply automatically custom branding to personal site (SkyDrive Pro)

Few months back I demonstrated how to apply custom branding automatically to personal sites or SkyDrive Pro sites in Office365 or on-premises using remote provisioning techniques. Example which I shared was aimed more for on-premises and I’ve received numerous emails related on how to update the app in a way that it would also work in the Office365. Thanks for Kirk Evans on helping to solve the right permissions for the app.

This example app has been now updated with few new additional capabilities, which were also asked often. Here’s the sort list of the included updates.

  • Code updated to Visual Studio 2013
  • Few modifications to ensure that it works properly in the Office365
  • Uploading of custom Contoso theme to each personal site before applying it to the site
  • Optimization of the code by storing indicator when branding has been applied, so that it’s not done numerous times for nothing
  • Debugging mode switch for app part to hide or show additional information related on app processing
  • Tested with Windows Azure and with accounts with only visitor permissions on site where added

Previous blog post explained the process already pretty well, so I won’t be explain the process in detailed in this post. I have however created new video recordings where the actual implementation is explained in detailed, including all the new capabilities. There’s also separate blog post which explains how to install this app to Windows Azure and shows the steps to perform for getting things up and running with Office365.

Video is available for download from my SkyDrive if needed for offline purposes.

If you need any guidance on how to setup this with Windows Azure, please check the details from my separate post, where we have video demonstrating the needed steps for installing this provider hosted to Windows Azure and to use that with your Office365 tenant.


Few useful links and recourses

Comments (9)
  1. Terry Hagan says:

    Thanks for this!

    Any chance of putting the video on your SkyDrive videos folder?

  2. Alex says:


    Thanks for the video, code and how this can be done – is there any chance you can upload the video somewhere else as it gets cut off at the end.  Thanks

  3. Vesa Juvonen says:

    Hi Terry and Alex,

    Thanks for you interest on this video.

    I've added the link to my SkyDrive for offline access. There was also indeed small hiccup while I was recording this one and I lost few minutes from the end. You should get the key point and needed steps still, so wasn't planning to re-record or add the missing pieces later.

  4. João Mattoso says:

    Hello Vesa,

    Just want to thank you for all the help that your post gave me.

  5. Kaka says:

    Hi Vesa,

    I tried your code with on-premise. Unforturnately, it doesn't work and threw exception when clientContext.Load(rootWeb); clientContext.ExecuteQuery();  ==> Err:  The site id "***************" is invalid. Please help.

  6. Vesa Juvonen says:

    Hi Kaka,

    that seems to be simply an issue of oAuth authentication. This example is currently build and tested to use with ACS based authentication, which does work in on-premises as well, as long as you setup the "low-trust" connection to Office365.

    Technically it should also work in on-prem using high trust, but have not tested that.

  7. Dag Martin Romslo says:

    Kaka and Vesa: I also have this problem in a high trust on-prem app. Have you found any solution to this since May?

  8. Vishal says:

    I have tried your solution. It works for tenant admin but not other user can do that.

    I  found this error "Access denied. You do not have permission to perform this action or access this resource."

  9. Vesa Juvonen says:

    Hi Vishal,

    we have not have that problem with our customer deployments, so can't really comment on details. Would alos recommend to have a look more recent version on this from here –…/customizing-onedrive-for-business-sites-with-app-model.aspx

Comments are closed.

Skip to main content