When fetching user profile data using CSOM, we are able to get the PictureURL property. However, when we attempt to display it, we're given the generic 'Image Not Found' image.

Initial (brief) investigation led me to this article: http://www.wictorwilen.se/sharepoint-2013-enabling-cross-domain-profile-pictures

Which seems to suggest that we're attempting to download the image from across a different domain, and SharePoint 2013 does not allow this by default.

The article provides a fix, but this seems to only apply to the on-premise version of SP2013. Office 365 version does not have that cmdlet installed/enabled.

What is the O365 way to do this?


You should use the cross-domain library.

Here is the article on MSDN : http://msdn.microsoft.com/en-us/library/fp179927.aspx

Look at the next steps on the bottom of the article for more samples.

This one seems to solve your issue : http://msdn.microsoft.com/en-us/library/fp161183.aspx

  • That looks like it's using a Sandbox Solution (deprecated).. isn't it? Apr 29 '13 at 15:28
  • Also note we get the URL of the profile image, it's just the image won't display in an iframe. I can't see how I can get an IMG tag to use the cross-domain library...? Apr 30 '13 at 7:21
  • No this is for an App for SharePoint 2013, which isn't deprecated. Have you tried it?
    – ggobbe
    Apr 30 '13 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.