Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

When trying to upload a picture directly within the Newsfeed on a teamsite I get "Sorry, this site hasn't been shared with you" and the upload is aborted. Adding pictures to the Newsfeed from mysite works fine.

I am running a brand new SharePoint 2013 single server installation with a out-of-the-box teamsite provisioned. June 2013 CU. Mysite host is set up on a separate web application. No custom code involved.

ULS log has this error:

System.UnauthorizedAccessException: Access denied., StackTrace: 
at Microsoft.SharePoint.SPFolderCollection.AddInternal(String strUrl, Int32 userId)    
at Microsoft.Office.Server.UserProfiles.UserProfileGlobal.GetOrCreatePictureFolder(String mySiteHostUrl, ProfileType profileType, Boolean createIfNotFound, Boolean forFeedAttachment)    
at Microsoft.Office.Server.Microfeed.SPMicrofeedAttachmentStore.PutImage(String mySiteHostUrl, Bitmap bitmap, String fileNamePrefix, UserProfile userProfile, String& previewUrl)    
at Microsoft.Office.Server.UserProfiles.ProfileImageStore.<>c__DisplayClass3.<SaveUploadedFile>b__0()    
at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass5.<RunWithElevatedPrivileges>b__3()    
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)    
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)    

The relevant ULS log entries are:

08.20.2013 11:53:02.58  w3wp.exe (0x1908)   0x3E9C  SharePoint Foundation   General aix9j   High    SPRequest.GetMetadataForUrl: UserPrincipalName=, AppPrincipalName= ,bstrUrl=/User Photos ,METADATAFLAGS=59  12d53a9c-da60-807d-66f0-416bb56bab20
08.20.2013 11:53:02.58  w3wp.exe (0x1908)   0x3E9C  SharePoint Foundation   General ai1wu   Medium  System.UnauthorizedAccessException: Access is denied. ...
08.20.2013 11:53:02.58  w3wp.exe (0x1908)   0x3E9C  SharePoint Foundation   General ftd0    Medium  Access Denied. Exception: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)), StackTrace:   at Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)     at Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder).    12d53a9c-da60-807d-66f0-416bb56bab20
08.20.2013 11:53:02.58  w3wp.exe (0x1908)   0x3E9C  SharePoint Portal Server    User Profiles   ajpda   Unexpected  ProfileImageStore.SaveUploadedFile: Exception: System.Threading.ThreadAbortException: Thread was being aborted. ...
08.20.2013 11:53:02.58  w3wp.exe (0x1908)   0x3E9C  SharePoint Portal Server    Profile Image Picker    5xze    High    ProfileImagePicker.SaveFileToPersonalSite(): System.Threading.ThreadAbortException: Thread was being aborted.     ...
share|improve this question
have you try to do the same with the Farm Account User? Did you check ULS log? –  Salvatore Di Fazio Jul 17 '13 at 11:41
Yes, same error with the farm account and any other account I have tried. Had a typo in my original post that I corrected now, the quoted stack trace is from the ULS not the Event log. –  anderaus Jul 17 '13 at 12:34
Did you figure out this problem? The same problem occurs with a farm account. –  Dennis G Aug 20 '13 at 9:53
No progress yet, but I just installed the 2013 August CU and will perform a new test soon. –  anderaus Aug 20 '13 at 11:59
Installed the 2013 August 2013 CU, which brings the version number up to 15.0.4535.1000, and the issue has NOT been resolved. Same error in UI and logs. –  anderaus Aug 22 '13 at 12:36

2 Answers 2

Unfortunately I cannot add a comment due to insufficient reputation.

But I guess you configured your mysite to use another domain as your "intra" web application. If yes than I believe the problem is described as an issue which exists since the preview of SharePoint 2013 as you can see in the following link. You need to scroll one item up to »Can't post picture on site feed when site feed is on a separate server from My Site« because there is no anchor in the page for this headline.


Hopefully the August CU solves this issue.

share|improve this answer
Woah nelly, this is exactly the problem! Not different servers, but of course different domain (mysite.domain.com & collaboration.domain.com). The second workaround suggests to have both on the same domain - I don't know how that would work as MySites typically are in different domains. –  Dennis G Aug 20 '13 at 13:13

As search results point to this post the actual answer is found here:


Add-PSSnapin Microsoft.SharePoint.PowerShell -EA 0
$webApp = Get-SPWebApplication "<my site host>"

SP13_PortalWebApp - Service account of web application hosting the team sites

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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