Steps for troubleshooting “My Tasks error in SharePoint 2013 My site“

This post is intended for those who are seeing an error as shown in the image below while accessing the “My Tasks” link in your SharePoint My site. As you all know for yourself the “My Task” link which you see in your SharePoint My site is driven by the “Work Management Service application” and it’s necessary to ensure that the WMA service is turned on and configured to run successfully. While I say the WMA service is the one that takes care of the “My Task “list that’s not the only component on which the “My Task “  list relies upon . There are couple of other dependencies such as “Search crawl” and “User Profile service” which takes care of the “My Task “list.

The “My Task” list in your SharePoint My site can display three different type of tasks ….

  1. The tasks assigned to you from Outlook ( this is possible only when you’re running Exchange Server 2013 and SharePoint Server 2013…they both need to be running on 2013 version )
  2. The tasks assigned to you from MS Project if you have that running in your environment and have configured that to sync with SharePoint.
  3. The tasks assigned to you using the default SharePoint “Task list “.

The Work Management Service Application provides functionality to aggregate tasks to a central location on SharePoint Server:

  1. Users get the possibility to view and track their to-dos and tasks.
  2. Tasks can be cached to a user’s personal site.
  3. Tasks can sync to Outlook where users can edit them wherever they have access to Outlook.
  4. Tasks can be aggregated from Exchange, Project Server and SharePoint.
  5. Based on ‘Provider model’ so that other systems can be integrated in the future.

Now, if the WMA (Work Management Service Application ) is not configured properly then you might end up seeing an error as shown in the figure below and you need to perform the below mentioned troubleshooting steps to get this fixed.

My task

Troubleshooting steps to fix this error:

  1. The Work Management Service Application should use the same account as the web application.
  2. Verify whether the service account for Work Management Service application has full control permissions on the User Profile Service application on Central Administration.
  3. Verify whether the service account for Work Management Service application has full control permissions on the Work Management Service application on Central Administration.
  4. Ensure that you do the above mentioned steps on the instance of the service application which is connected to the My site web application.
  5. Grant “Full Control” to the work management service account on the User Profile service application using “administrators” button on the ribbon.
  6. In addition to that grant “Full control” to the work management service account on the user profile service application using the “permissions” button on the ribbon.
  7. Ensure that the work management service account is given appropriate permissions in the “My site” content database.
  8. Check whether the service account of the Work management service application is equal to the identity of the web application pool because this could be an issue with the permissions too.
  9. Restart the Work management service and the user profile service on the servers.
  10. Perform an IIS reset.
  11. If this didn’t help ,please run the below mentioned PowerShell command

Run the PowerShell command to grant content access to a process account to the MY SITE web application:

  • $webApp = Get-SpWebApplication [URL of the MYSite web application
    $webapp.GrantAccessToProcessIdentity(“[Work Management account]”)
  • Note: this should do three things:
  •      Add the work management account to the user policy of the web application
  •      Add the work  management account to the config database with the permissions of     WSS_Content_Application_Pools
  •      Add the work management account to the My Site content database with the permissions of SPDataAccess.

12. Perform an IIS reset once done and also restarting the server and critical services is recommended.

IMPORTANT:

The tasks are stored in a hidden list called “WmaAggregatorList_User” at the personal site of individual users.

WMA aggregates tasks from SharePoint lists created in SharePoint Server (internally called TasksWithTimelineAndHierarchy-171) plus upgraded SharePoint lists from earlier versions of SharePoint (internally called Task-107 or GanttTasks-150).

 

Advertisements

Patching Distributed Cache in SharePoint Server 2013

The Distributed Cache plays an important role in SharePoint Server 2013 as it’s a key component for performance and caching. Distributed Cache is not a SharePoint service, it’s a standalone service called AppFabric 1.1 for Windows Server. SharePoint Server 2013 requires Windows Server App Fabric and the App Fabric 1.1 CU 1 (KB 2671763) to be installed .It takes care and improves the performance of the following features in SharePoint Server 2013:

  • Authentication
  • Newsfeeds
  • OneNote client access
  • Security Trimming
  • Page load performance

This document explains in detail about the procedure to be followed for patching the App Fabric component in Windows Server. An App Fabric Cumulative Update is exactly the same as a CU for SharePoint, it contains all previous CUs. So if we install CU6 you also get CU1 to CU5 installed.

List of App Fabric 1.1 Cumulative Updates:

Note: If you want to identify the version of App Fabric installed in your machine and also the CU version which is installed, please go to the “Programs and Features” section in Control panel and take a look at installed updates.

AF

  1. The version number would be listed there.
  2. The installed CU would also be listed there with the corresponding KB number.

 

System Requirements:

  1. Windows Server 2012/2012 R2 32-bit or 64-bit.
  2. Before applying the cumulative update, make sure you have administrative privileges on the computer where you’re installing this software.
  3. To apply this cumulative update package, we must have AppFabric 1.1 for Windows Server installed. Additionally, we should also have the Microsoft .NET Framework 4.5 installed.
  4. A system restart is required after installing the Cumulative Update.

Now let’s take a look on the steps to be followed for installing the CU on a server running SharePoint 2013.

Listed below are the steps to be followed for applying the App Fabric CU’s:

  1. Please download the CU from Microsoft download center .I’m considering the CU 6 here. Download link for App Fabric 1.1. CU 6 :_ https://support.microsoft.com/en-us/kb/3042099
  2. Once done downloading the cumulative update package to the server in which you’re going to run it, please run the below mentioned to gracefully shutdown the service instance on the local machine.

Stop-SPDistributedCacheServiceInstance –Graceful

  1. This command will gracefully shutdown the service instance on the local machine. A graceful shutdown means that all the cache items will be distributed to the other service instances in the cache cluster.
  2. Wait for minutes to make sure that all the cached items has properly propagated to the other servers.
  3. Now it’s time to run the package, run the patch executable and follow the instructions. It’s basically a next, next, finish procedure. The App Fabric 1.1 CU 6 doesn’t need any specific change to be made on the exe.config  file like how CU 3 did. So please proceed further by clicking next.
  4. Once you’re done installing the CU, please restart the computer.
  5. When the machine is back online, please run the below mentioned command to start the service instance again. The App Fabric Windows Service will be disabled when its shutdown and we are not supposed to start it manually. Please use the below mentioned PowerShell command to do that.

$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”

$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}

$serviceInstance.Provision()

  1. This command will turn on the Distributed Cache service instance on the machine and will start the AppFabric Windows Service.
  2. Once you’re done completing all the above mentioned steps you’re now ready to move on to the next machine.
  3. Please allow some time for the newly patched cache service instance to catch up.
  4. Finally run the below mentioned commands to check if the Distributed cache service is back online.

To see what  Distributed cache-servers SharePoint thinks there are run this:

Get-SPServiceInstance | ? {($_.service.tostring()) -eq “SPDistributedCacheService              Name=AppFabricCachingService”} | select Server, Status

For AppFabric run this from a machine already in the cache-cluster:

Use-CacheCluster

Get-CacheHost

  1. This will confirm whether the Distributed cache service is back online from a SharePoint as well as from an App Fabric perspective.
  2. For any reason, if you don’t see the status of the servers as “online”, please go ahead and run the below mentioned command to remove and re-add the Distributed Cache Service Instance.

To remove:  Remove-SPDistributedCacheServiceInstance

To Add   :    Add-SPDistributedCacheServiceInstance

  1. Run the remove command first and then wait for couple of minutes and then run the add command.
  2. At last, once everything looks fine you’re good to go ahead and patch the second server following the same steps mentioned above.

Troubleshooting Distributed Cache in SharePoint Server 2013

The Distributed Cache plays an important role in SharePoint Server 2013 as it’s a key component for performance and caching. Distributed Cache is not a SharePoint service, it’s a standalone service called AppFabric 1.1 for Windows Server. SharePoint Server 2013 requires Windows Server App Fabric and the App Fabric 1.1 CU 1 (KB 2671763) to be installed .It takes care and improves the performance of the following features in SharePoint Server 2013:

  • Authentication
  • Newsfeeds
  • OneNote client access
  • Security Trimming
  • Page load performance

It’s always quite comfortable to manage Distributed Cache in SharePoint Server 2013 using PowerShell and the same applies while troubleshooting it also .This articles discusses on the useful PowerShell commands that can be used to troubleshoot Distributed Cache service in SharePoint Server 2013.

                     Command                    Explanation
                  Use-CacheCluster This is used to enable cache administration via PowerShell.
                  Get-CacheHost This would get you the list of every server in the cluster as well as the state of the service on that server.
      Get-CacheHostConfig <HostName> <Port> This would give you the general configuration details about a specific host in the cache cluster. All Windows Server AppFabric cache hosts use TCP/IP to communicate with each other and support the cache cluster. The SharePoint distributed cache is an AppFabric cache behind the scenes and  it uses the default AppFabric ports for server to server communication. These ports should be allowed through your firewalls for the cacheservice  to function correctly.
           Get-CacheAllowedClientAccounts This would tell which accounts/groups have rights to connect to the cache cluster as clients. This seems to be the standard configuration in SharePoint 2013.
                   Get-Cache Gets a listing of all the default caches in the farm. All caches have the Id (Guid) of the farm appended to the name.
       Get-CacheConfig <CacheName> Gives you the details about a specific cache instance
         Restart-CacheCluster This will restart the distributed cache service on all servers in the cluster and it will also clear the contents of the cache.
  Stop-SPDistributedCacheServiceInstance -Graceful This will stop the distributed cache service on an individual machine. The Graceful parameter will allow the cache service to migrate cached items to another host in the cluster.
 Remove-SPDistributedCacheServiceInstance Removes a cache host from the cluster. The best practice is to stop the cache service before you remove it.
  Add-SPDistributedCacheServiceInstance This command will add the cache host back to the cluster. If there is more than one host in the cluster, it will take a few minutes for the service to start and for any cached items to be synchronized to the new host.
   Get-CacheClusterHealth  Returns health statistics for all of the named caches in the cache cluster.
    Clear-CacheLogging  This command is used to disable all logging for the current admin
    Get-CacheStatistics Gives the statistics for a Cache or for a Cache Host.
     Start-CacheHost This would start the Caching Service on the specified cache host. If no cache hosts are up in the cache cluster, use the Start-CacheCluster command instead
     Stop-CacheCluster Stops the Caching Services on all cache hosts in the cluster.
    Stop-CacheHost Stops the specified cache host service.
   Test-CacheConfigAvailability Tests the connection with the cache cluster configuration store. This command will throw an exception if the connection fails.

In addition to the commands listed above there are couple of other things which you’re supposed to know while troubleshooting Distributed Cache Service/App Fabric.

  1. Query AppFabric for Caching Servers/Statuses :

To get the list of servers that AppFabric thinks there should in the cluster run “Get-CacheHost” (use “Use-CacheCluster” if necessary). This command gives us the list of the servers and also their availability status as far as AppFabric’s concerned.

  1. Query SharePoint for Caching Servers/Statuses :

To do the same for SharePoint, run:

Get-SPServiceInstance | ? {($_.service.tostring()) -eq “SPDistributedCacheService Name=AppFabricCachingService”} | select Server, Status

This will give you the same kind of data but from SharePoint perspective.  Make sure all the servers show the status as “Online” but more importantly that both SP & AF have the same names between them. If you see “cacheHostInfo is null” somewhere then it’s quite likely there’s a mismatch here.

What if one or more App Fabric Service Instance is disabled?

Run the below mentioned PowerShell command …..

Get-SPServiceInstance | ? {($_.service.tostring()) -eq “SPDistributedCacheService Name=AppFabricCachingService”} | select Server, Status

If any status shows as “disabled” then we have a problem and in that case please perform the below mentioned steps:

  1. Remove the service-instance (see above).
  2. Try re-adding it with Add-SPDistributedCacheServiceInstance
  3. Verify the new service-instance is “online”.

If for some reason Add-SPDistributedCacheServiceInstance doesn’t give you a healthy endpoint, try running Remove-SPDistributedCacheServiceInstance then Add-SPDistributedCacheServiceInstance on the server in question. If you still can’t get a healthy endpoint then it needs some serious consideration.

 

Command to Stop and Start the Distributed Cache service:

To start the Distributed Cache service by using Windows PowerShell:

At the Windows PowerShell command prompt, run the following command:

$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”

$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}

$serviceInstance.Provision()

To stop the Distributed Cache service by using Windows PowerShell :

At the Windows PowerShell command prompt, run the following command:

$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”

$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}

$serviceInstance.Unprovision()

Quick Edit option not working on SharePoint List:

This post discusses on a known issue where the “quick edit “option is greyed out in a “SharePoint custom list”. Please note that the contents discussed on this post  only applies for a “SharePoint custom list “ , this may or may not be true for the other list types in SharePoint .

0

Reasons why the quick edit option is greyed out:

While there can be couple of reasons for this option to be disabled/greyed out in a SharePoint List , the below mentioned one’s are the known possibilities and its always suggested to go and take a look at this when the “quick edit “ option is greyed out in a SharePoint custom List .

  1. The “Quick Edit “ option not being turned on under “Advanced settings” option in “List settings “ .
  2. The list has “grouping “enabled and this will disable the “quick edit “option.
  3. The “Allow individual item “check-box not being checked on “Tabular view “.

Now given these reasons, let’s take a look at how to fix them ….

  1. The “Quick Edit “ option not being turned on under “Advanced settings” option in “List settings “ 

1. Go to list settings –> Advanced settings

2. On Advanced settings you will have an option as shown below .Make sure this is set to “ Yes “

1

 2.   The list has “grouping “enabled and this will disable the “quick edit “option.

           If the list has “ grouping “ enabled then the quick edit option will not be displayed and in order to fix this you need to remove the “ grouping “ option from the list .

1. Go to “Modify view “option in the top ribbon interface as shown below and click on it.

2

2.  Once you’re on the “Modify view “ screen ,please scroll all the way down to “ Group By” and make sure that all the options are set to “ None “ here .

3

3. By any chance if you see any “group by “settings made here, please remove that for the “quick edit” option to work.

3.  The “Allow individual item “checkbox not being checked on “Tabular view “.

1. Go to the “Tabular view “option under “Modify view “and make sure that the “Allow individual item check-box “is checked.

4

Things to know about SharePoint Hybrid Search

Things to know about SharePoint Hybrid Search:

This post is mainly intended for those who want to understand about those services that can go Hybrid on SharePoint Server 2013 and I’ll be mainly discussing specifically about “SharePoint Server Hybrid search” here ….

The below mentioned SharePoint services can go hybrid:

  1. One drive for business
  2. SharePoint Search
  3. Business Connectivity service
  4. Duet for enterprises

 TechNet link for Hybrid SharePoint Services: _ https://technet.microsoft.com/en-us/library/dn197168.aspx

Now as mentioned before I’ll be discussing about “SharePoint Hybrid search” alone in this post and will be discussing about other SharePoint services that can go hybrid in a different post.

I’m going to keep this post simple by discussing only about what “SharePoint Hybrid search” is all about and the different topologies it has. The configuration part will be discussed on an upcoming new post.

What is SharePoint Hybrid Search?

To put it in simple words the term “Hybrid “here refers to using both on-premises + office 365 (SharePoint online) in your SharePoint deployment .If you have an environment where both your SharePoint server and office 365 (i.e. SharePoint Online) is integrated then it’s likely to be called as a “Hybrid SharePoint environment “.

Different topologies available in SharePoint Hybrid search:

There are three different topologies to speak about that are available for configuring SharePoint Hybrid search and it’s up to you as a SharePoint administrator to choose the right topology that suits the business requirement .

The 3 different topologies are …..

  1. One-way outbound search
  2. One-way inbound search
  3. Two way (bidirectional) –> (I’m not sure if this is supported by Microsoft as of now .However I’ve discussed about this method also )

One-way outbound search:

   In this model the user executes a search query in the SharePoint on-premises search center site and the query component looks for the results from the SharePoint on-premises site as well as from Office 365 and displays it for the user in the search results .

out

Note: The users should SharePoint online license assigned to them to be able to get the search results from SharePoint Online.

One-way inbound search:

     In this model the user executes a search query in the SharePoint online search site and the query component looks for the results from the SharePoint online sites as well as from SharePoint on-premises site and displays it for the user in the search results.

inbound

Note: The users should SharePoint online license assigned to them to be able to get the search results from SharePoint Online.

Two-way (bidirectional) topology:

    The name speaks for itself. In this model the user will be able to execute a search query in the SharePoint on-premises search site and get results from SharePoint server as well as from Office 365 (i.e. SharePoint online). Similarly, a user who executes a search query in SharePoint online will be able to get search results from SharePoint online as well as from SharePoint Server.

bi

Note: The users should SharePoint online license assigned to them to be able to get the search results from SharePoint Online.

End user experience in the search center:

The below illustration shows how a user will see the results in the search center when his SharePoint environment is configured for Hybrid search ….

ue

Search model for a Hybrid-search environment:

qf

Also, if you haven’t gone through the video in the link below, I highly recommend you to take a look at this to understand about SharePoint server Hybrid search and how it works :

https://channel9.msdn.com/Events/SharePoint-Conference/2014/SPC320

 

 

“The My site of user is scheduled for deletion” email message in SharePoint Server 2013 & SharePoint Online

This article will discuss on the “My site deletion email message “which the users get when their subordinates “My site” is scheduled for deletion.

This mainly takes place because of the “My site cleanup timer job” and it takes care of deleting the user’s “My site “ that is scheduled for deletion .This article discusses about the how the timer job works and what it does .

clean up 1

What is the My Site Cleanup Timer Job?

The My Site Cleanup Job is responsible for deleting user profiles and My Sites of those users.  This includes the following activities:

  1. Remove user profiles that are queued for deletion.
  2. If those users have a My Site, assign the user’s manager as the secondary site owner. Email the manager letting them know that the user’s My Site will be deleted in 14 days.
  3. Exactly 11 days after the first notification, email the manager again letting them know that the My Site will be deleted in 3 days.
  4. After a period of 14 days, delete the My Site.

The first thing which we need to understand is how a user profile is actually deleted.

clean up 2

How is a user profile deleted in SharePoint?

Now, there are couple of ways on how a user’s profile is deleted with regards to SharePoint.

  1. A user profile is deleted when we delete it from the “Manage user profile” section in Central Administration.
  2. When a user account which was included in a previous profile import is no longer included in the next import.

Suppose you delete a user account in Active Directory and then run an incremental or full user profile synchronization.  You would expect that this means the user profile is deleted, and in fact this is picked up as a delete from Active Directory and processed in the FIM, where SharePoint picks up the fact the user profile is deleted and deletes it.

What happens when the “My site Cleanup Timer job “runs?

Listed below are the detailed steps about what happens when the “My site” cleanup timer job runs ….

  1. A user’s account gets disabled/deleted in Active Directory when the user leaves the firm or if the user is terminated.
  2. Once the user’s account is deleted/disabled and when SharePoint gets to know about this, the “My site “deletion timer job will be triggered in that user’s account.
  3. It first removes the user’s profile from SharePoint and once the profile is removed the user will no longer have access to the SharePoint sites. Well, it’s quite obvious that the user won’t be able to access any resource in the domain as his AD account itself is disabled.
  4. Once that’s done the access delegation part of the user’s “My site” takes place. What happens here is that the timer job looks for the user’s manager and will assign the manager’s account as the secondary owner for the user’s “ My site “ .Now this process will send an email to the user’s manager letting him/her know about his/her subordinate’s “ My site “ and will also have a link to the user’s “ My site “
  5. This would give the manager complete access to the user’s “My site” including the “My documents “folder.
  6. Suppose if the user doesn’t have a “manager” mentioned in his/her SharePoint profile then the timer job will look for the secondary owner of the user’s “My site “.If it finds a secondary contact it will then make the secondary contact as the secondary owner of the “My site “and will send an email to the secondary owner letting him/her know about the “My site”.
  7. The email will be sent in 3 parts , the first one will be a notification of the user’s “My site” with a link to the user’s “My site “ .The second one will be sent exactly 11 days after that and this will give a reminder to manager about his/her subordinate’s “ My site”. Finally, the last one will be sent on the 14th day stating that the user’s “My site “is deleted.

Note: It doesn’t necessarily mean that the clean job will run on a user’s account only when the user’s account is deleted/disabled in AD. Even if the user’s account is moved to different OU SharePoint will consider the fact that this account is no longer existing in the same OU as the profile synchronization connection is broken and will run the “ My site “ deletion timer job in the user’s account .

What happens when the user doesn’t have a manager?

Manager Profile Property Populated Secondary Contact Configured Email Sent Site Queued for Deletion
Yes Yes Yes, to manager Yes
Yes No Yes, to manager Yes
No Yes Yes, to secondary contact Yes
No No No No

Is it possible to customize the timer job?  

Indeed it’s possible to customize the timer job .You can change the job schedule and you can also plan your own cleanup process.

Issue with the “My site “deletion email message in SharePoint Server 2013:

When a user profile is deleted from My Site, an email is sent to the user’s manager. However, this email contains a link to the user’s root My Site which no longer exists. In addition, you receive the following error message:

clean up 3

This issue has been addressed in the September 8, 2015 update: _ https://support.microsoft.com/en-us/kb/3085481

My site deletion email message in SharePoint Online:

When an OneDrive for Business site collection is scheduled for deletion, the default action is to transfer ownership of the site to the manager of the original work account or school account that is being deleted. For this to occur, the user profile Manager Property must be set for the original owner of the OneDrive for Business site.

The Access Delegation setting is configured in the SharePoint admin center. This setting is located in Setup My Sites under the User Profiles section. By default, Access Delegation is enabled. We recommend that you also configure a secondary owner account in this section. This account will be the appointed owner of the site collection if the user profile Manager Property isn’t set for the original site owner. Email notifications will also be sent to the secondary owner account when the value is populated.

When a manager or secondary owner isn’t set for the user profile, or if the Access Delegation setting is disabled, the profile and OneDrive for Business site collection will follow the same deletion process that’s described in the next section. However, no email messages will be sent.

The profile and OneDrive cleanup process in SharePoint Online:

  1. A work or school account is deleted from the Microsoft Office 365 admin center or is removed through Active Directory synchronization.
  2. The account deletion is synchronized to SharePoint Online.
  3. The My Site Clean Up timer job runs, and the user profile is marked for deletion. The profile will be preserved in the database in a deleted state for 30 days. This coincides with the time that’s allocated to restore a deleted user account from the Azure Active Directory recycle bin.
  4. If the Manager Field is populated for the deleted account, the manager will receive an email message that states that the site will be removed in 30 days and that access to the site is granted to the manager.
  5. If the Manager field isn’t populated for the user account and a secondary owner was configured in Setup My Sites under the User Profile section of the SharePoint admin center, the secondary owner contact will receive an email message that states that the site will be removed in 30 days and that access to the site is granted to the user.
  6. After 27 days, a second email message will be sent to the manager or secondary owner that states that the site will be deleted in three days.
  7. After three days, the profile for the deleted account is deleted from the user profile service.

The personal site (that is, the OneDrive for Business site) for the deleted account is sent to the site collection recycle bin. The site is deleted from the recycle bin according to the site collection recycle bin retention policy, which is 30 days.