Monday, May 5, 2014

SharePoint 2013 Workflow gets Suspended

I was stuck with the error of Workflow gets suspended automatically.
Only Users with Full Control Permissions could make workflow start with no problems, but any user else face this problem.

RequestorId: eda26c74-95ef-2733-0000-000000000000. 
Details: An unhandled exception occurred during the execution of the workflow instance. 
Exception details: System.ApplicationException: HTTP 401 {"Transfer-Encoding":["chunked"],"X-SharePointHealthScore":["0"],"SPClientServiceRequestDuration":["200"],"SPRequestGuid":["eda26c74-95ef-2733-9cb7-5327536614d3"],"request-id":["eda26c74-95ef-2733-9cb7-5327536614d3"],"X-FRAME-OPTIONS":["SAMEORIGIN"],"Cache-Control":["max-age=0, private"],"Server":["Microsoft-IIS\/8.0"],"WWW-Authenticate":["NTLM","Basic realm=\"SharePoint.contoso.com\""],"X-AspNet-Version":["4.0.30319"],"X-Powered-By":["ASP.NET"],"MicrosoftSharePointTeamServices":["15.0.0.4420"],"X-Content-Type-Options":["nosniff"],"X-MS-InvokeApp":["1; RequireReadOnly"],"Date":["Mon, 05 May 2014 07:55:44 GMT"]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

I made sure the User Profile Service is Configured and I did the full synchronization, and the user has a profile.

Finally nailed it by following steps:
1- Make sure the Workflow History List has the same permissions as your list, or grant a unique permission ,Contribute, for the users who will use the workflow.

2- Make sure the Workflow Tasks List has the same permissions as your list, or grant a unique permission ,Contribute, for the users who will use the workflow.

3- Check your workflow through SharePoint Designer and check permissions granted in any related list in the workflow ( That Solved my Problem, As I had another list which I get data from it and by mistake permissions there changed ) 


Usefull Links For Same Issue:


Wednesday, April 2, 2014

Get SharePoint SubSite List items via PowerShell

If you want to get all items in a specific list in Subsite, PowerShell can help:

Add-PSSnapin Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue

$spWeb = Get-SPweb "http://sp/site"

$subsite = $spweb.Webs | where {$_.title -eq "SubSiteName"}
$lists = $subSite.Lists
$mylist = $lists | where {$_.title -eq "ListName"}
$mylist.GetItems() | select name


Tuesday, April 1, 2014

Sorry, We couldn't find your file. is it possible it was moved, renamed or deleted? SharePoint 2013,SkyDrive,OneDrive,Office Web Apps


I was trying to Edit a document -which hosted on SharePoint- in client side Word application , but I faced this error "Sorry, We couldn't find your file. is it possible it was moved, renamed or deleted? " followed by half of the URL.




After alot of trails I found the best ways to solve this issue, as it was not clear in most of the websites.

First:
Restart-Service AppFabricCachingService

Second:
You have to check the client side, as my problem was there, my Microsoft Office edition didn't allow me to open the file, Try to Repair it , or better to UnInstall then Install it again


Last:
Use the following PowerShell in your environment:


$config = (Get-SPSecurityTokenServiceConfig)
$config.AllowOAuthOverHttp = $true
$config.Update()


Also you can find more in the following links:
http://blog.sharepointsite.co.uk/2014/01/office-web-app-ran-into-problem-opening.html

http://social.technet.microsoft.com/Forums/sharepoint/en-US/31c6d108-e94d-41a1-99a9-570b3880eb33/sharepoint-2010-and-office-2013-cant-edit-documents

http://social.technet.microsoft.com/Forums/sharepoint/en-US/9662d5cf-0381-4c70-89cb-301ec1ea4439/sorry-we-couldnt-fine-your-file-is-it-possible-it-was-moved-renamed-or-deleted-skydrive?forum=sharepointgeneral

Monday, March 31, 2014

Emails from "workflow@noreply" - SharePoint 2013

It was a bug in the SharePoint 2013 that workflows send emails from Workflow@noreply ... and this was actually fixed in the SharePoint 2013 March PU, the engine now will send as the outbound email address configured in the Central Administration.

Download SharePoint Updates from

Tuesday, March 25, 2014

Profile Pictures no longer display in MySites after moving MySite URL or changing web application in SharePoint 2013



2-    Stop the User Profile synchronization service
Central Administration > System Settings > Manage Services on Server > User Profile Synchronization Service > Stop

3-    You must disable My Site cleanup timer job before you reset the synchronization database. (Otherwise, the job will delete all user profiles and My Sites from the farm) and Disable User Profile Incremental Synchronization timer job
Central Administration > Monitoring > Review Job Definition > My Site Cleanup Job > Disable
Central Administration > Monitoring > Review Job Definition > User Profile Service Application Name-User Profile Incremental Synchronization > Disable

4-    Stop the SharePoint 2013 Timer Service
SharePoint 2013 Management Shell (Run as Administrator) > net stop sptimerv4

5-    Reset the Synchronization Database
a-    SharePoint 2013 Management Shell (Run as Administrator) > Get-SPDatabase
Then find the ID of Sync DB (Default name is Sync DB).
b-    SharePoint 2013 Management Shell (Run as Administrator) > Get-SPServiceApplication
Then find the ID of User Profile Service App.
c-     Copy the following code and paste it into a text editor and save it as ResetSyncDB.ps1 :
$syncid = “<id from step a>”
$upaid = "<id from step b>"
$syncdb=Get-SPDatabase $syncid
$syncdb.Unprovision()
$syncdb.Status='Offline'
$upa= Get-SPServiceApplication $upaid
$upa.ResetSynchronizationMachine()
$upa.ResetSynchronizationDatabase()
$syncdb.Provision()
d-    In SharePoint 2013 Management Shell change the directory the where you saved the ResetSyncDB.ps1
Then type: ./ResetSyncDB.ps1

e-    Using SQL Server Management Studio, create a login in SQL Server for the User Profile synchronization service account (that is, the farm account). Then, in the synchronization database, create a database user who maps to the login and grant it access to the db_owner database role. (See How to: Create a SQL Server LoginHow to: Create a Database User, and Database-Level Roles)

6-    Start the SharePoint 2013 Timer Service:
SharePoint 2013 Management Shell (Run as Administrator) > net start sptimerv4

7-    Start the User Profile synchronization service
Central Administration > System Settings > Manage Services on Server > User Profile Synchronization Service > Start

8-    Reset IIS:
SharePoint 2013 Management Shell (Run as Administrator) > iisreset

9-    Create connections to the data sources.
a-    Open User Profile Service Application Settings
Central Administration > Application Management > Service Application > Manage Service Application> User Profile Service Application
b-    Create New Synchronization Connection
Synchronization > Configure Synchronization Connection > Create New Connection

10-  Import Users Photos from Active Directory Into SharePoint
a-    in the User Profile Service Application Page
People > Manage User Properties > Picture > Edit
b-    Scroll down to the Add New Mapping section.  Choose your AD data connection, select the thumbnailPhoto attribute and click Add, followed by OK to save the change. This maps the SharePoint picture property to a user’s photo attribute in AD.

11-  Enable My Site Cleanup Timer Job and User Profile Incremental Synchronization timer job
a-    Run two full profile synchronizations.
b-    Once the second profile synchronization is finished, open the SharePoint 2013 Management Shell (Run as Administrator)
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation <MySiteURL>
c-     After the second profile synchronization is finished;
Central Administration > Application Management > Service Application > Manage Service Application> User Profile Service Application > Manage User Profiles
d-    Next to View, select Profiles Missing from Import
e-    In the Find Profiles box, type the domain for the profiles and then click Find.
f-     For each profile that is returned, check the originating directory service, such as Active Directory, for the status of that profile. If the status of any of the returned profiles in the directory is not disabled or is not deleted, do not enable the My Site cleanup timer job (Ignore next step only). Contact Microsoft support for more assistance. Otherwise, enable the My Site cleanup timer job.
g-    Enable My Site Cleanup Job
Central Administration > Monitoring > Review Job Definition > My Site Cleanup Job > Enable
h-    Enable the User Profile Incremental Synchronization timer job
Central Administration > Monitoring > Review Job Definition > User Profile Service Application Name-User Profile Incremental Synchronization > Enable


Refrences: