Monday, July 9, 2018

SharePoint 2010 Build Numbers ( Versions)

To get the build number of your farm, go to Central Administration > System Settings > Manage servers in your farm (<centraladminurl>/_admin/FarmServers.aspx)
Or using Windows PowerShell: (get-spfarm).buildversion
To check which build your products are, go to Central Administration > Upgrade and Migration > Check Product and patch installation status. (<centraladminurl>/_admin/PatchStatus.aspx)
To check  which build your databases are, go to Central Administration > Upgrade and Migration > Review database status (<centraladminurl>/_admin/DatabaseStatus.aspx)
 Patch terminology KB article.

Download Link
All components
RTMFarm Build Version
June 2010 CU
SharePoint Foundation 2010
June 2010 CU
Microsoft Shared Components
June 2010 CU
Microsoft SharePoint Portal
June 2010 CU
Microsoft User Profiles
June 2010 CU
Microsoft Search Server 2010 Core
June 2010 CU
Microsoft Web Analytics Web Front End Components
August 2010 CU
SharePoint Foundation​ 2010
August 2010 CU
SharePoint Server 2010
October 2010 CUSharePoint Foundation​ 2010KB2394323
14.0.5128.5000October 2010 CUSharePoint Server 2010​KB2394320
14.0.5130.5002​​December 2010 CU
SharePoint Foundation 2010
December 2010 CU​SharePoint Server 2010​KB2459257
14.0.5136.5002​February 2011 CU​
SharePoint Foundation 2010
14.0.5136.5002​February 2011 CU​SharePoint Server 2010​KB2475878
14.0.5138.5000​April 2011 CU​SharePoint Foundation 2010KB2512804​
14.0.5138.5000​April 2011 CUSharePoint Server 2010​KB2512800
14.0.5138.5000​April 2011 CU​Project Server 2010KB2512801
​14.0.6029.1000​Service Pack 1​SharePoint Server 2010​KB2460045Download
​14.0.6029.1000​Service Pack 1​Office Web AppsKB2460073Download
​​14.0.6029.1000​Service Pack 1​Project Server 2010KB2460047Download
​14.0.6029.1000​Service Pack 1​SharePoint Foundation 2010KB2460058Download
14.0.6029.1000​Service Pack 1​FAST Search ServerKB2460039Download
​14.0.6105.5000​June 2011 CU Mark 1​​SharePoint Server 2010​KB2536599
​14.0.6105.5000​June 2011 CU Mark 1​SharePoint Foundation 2010KB2536601
​14.0.6105.5000​​June 2011 CU Mark 1​Project Server 2010KB2536590
​14.0.6106.5002​​June 2011 CU Mark 2​​​SharePoint Server 2010​KB2536599Download
​14.0.6106.5002​​June 2011 CU Mark 2​SharePoint Foundation 2010KB2536601​Download
​14.0.6106.5002​​June 2011 CU Mark 2​Project Server 2010KB2536590Download
14.0.6105.5000​June 2011 CU​Office Web AppsKB2553919Download
14.0.6109.5002​August 2011 CU​SharePoint Server 2010KB2553048Download
14.0.6109.5000​August 2011 CU​​SharePoint Foundation 2010KB2553117Download
​August 2011 CU​Project Server 2010KB2553047Download
14.0.6109.5000​August 2011 CU​FAST Search ServerKB2553040Download
14.0.6112.5000​October 2011 CU​SharePoint Server 2010KB2596505Download
14.0.6112.5000​​October 2011 CU​​​SharePoint Foundation 2010KB2596508Download
14.0.6112.5000​​October 2011 CU​​Project Server 2010KB2596506Download
14.0.6114.5000December 2011 CU​SharePoint Server 2010

14.0.6114.5000December 2011 CU​SharePoint Foundation 2010 Download
14.0.6114.5000December 2011 CU​Project Server 2010KB2597015Download
14.0.6117.5002 ​February 2012 CU​SharePoint Server 2010​KB2597150​Download​
14.0.6117.5002 ​February 2012 CU​SharePoint Foundation 2010​KB2597132Download
14.0.6117.5002 ​February 2012 CU​Project Server 2010​KB2597152Download
14.0.6117.5002 ​​February 2012 CU​Office Web Apps​KB2598022Download
14.0.6117.5002​February 2012 CU​​FAST Search ServerKB2597131Download
14.0.6120.5000April 2012 CU​ Mark1​​SharePoint Server 2010​Removed
14.0.6120.5000​April 2012 CU​ Mark1​SharePoint Foundation 2010​​Removed
14.0.6120.5000​April 2012 CU​ Mark1​Project Server 2010​Removed
14.0.6120.5000​​April 2012 CU​​​FAST Search ServerKB2598329Download
14.0.6120.5006​April 2012 CU​ Mark 2​SharePoint Server 2010​KB2598151​​Download
14.0.6120.5006​April 2012 CU​ Mark 2​SharePoint Foundation 2010​KB2598321Download
14.0.6120.5006​April 2012 CU​ Mark 2​Project Server 2010KB2598152​​Download
14.0.6123.5002​June 2012 CU​SharePoint Server 2010​KB2598354Download
14.0.6123.5002​​June 2012 CU​SharePoint Foundation 2010​KB2598373Download
14.0.6123.5002​​June 2012 CU​Office Web Apps​KB2687273Download
14.0.6123.5002​June 2012 CU​Project Server 2010KB2598355Download
14.0.6126.5000​August 2012 CU​SharePoint Server 2010KB2687353Download
14.0.6126.5000​August 2012 CU​SharePoint Foundation 2010​KB2687355Download
14.0.6126.5002​August 2012 CU​Project Server 2010KB2687354Download
14.0.6129.5003​​October 2012 CU​SharePoint Server 2010KB2687564Download
14.0.6129.5000​October 2012 CU​SharePoint Foundation 2010KB2687566Download
​October 2012 CU​​Office Web Apps​KB2687562Download
​​October 2012 CU​​Project Server 2010KB2687615Download
​October 2012 CU​​​FAST Search ServerKB2760395Download
14.0.6131.5003December 2012 CU​SharePoint Server 2010KB2596955Download
14.0.6131.5001December 2012 CU​​SharePoint Foundation 2010KB2596957Download
14.0.6131.5003December 2012 CU​Project Server 2010KB2596956Download
14.0.6131.5001December 2012 CU​Office Web Apps​KB2726912Download
14.0.6134.5000​​February 2013 CU​SharePoint Server 2010KB2767793Download
14.0.6134.5000​​February 2013 CU​​​SharePoint Foundation 2010KB2760791Download
14.0.6134.5000​​​February 2013 CU​Project Server 2010KB2767794Download
14.0.6134.5003​February 2013 COD​SharePoint Server 2010Blog PostDownload
14.0.6137.5000​April 2013 CU​SharePoint Server 2010KB2775353Download
14.0.6137.5000​April 2013 CU​SharePoint Foundation 2010KB2794728Download
14.0.6137.5000​April 2013 CU​Project Server 2010KB2775426Download
​14.0.6137.5000​April 2013 CU​FAST Search ServerKB2794672Download
14.0.7011.1000​SP2 Public Beta​SharePoint 2010Download
​14.0.7015.1000​​Service Pack 2​SharePoint Server 2010KB2687453​​​Download
​Service Pack 2​SharePoint Foundation 2010KB2687464​​Download
​Service Pack 2​Project Server 2010KB2687452​​Download
​Service Pack 2​​Office Web Apps​KB2687470​​Download
​​Service Pack 2​FAST Search ServerKB2687446​​Download
​ 14.0.7102.5000​June 2013 CU Mark 1​SharePoint Server 2010KB2817363Download
​ 14.0.7102.5000​June 2013 CU Mark 1​SharePoint Foundation 2010KB2817392Download
​14.0.7102.5000​June 2013 CU Mark 1​Project Server 2010KB2817368Download
​14.0.7102.5004​June 2013 CU Mark 2​SharePoint Server 2010KB2817527Download
​June 2013 CU Mark 2​SharePoint Foundation 2010KB2817552Download
​June 2013 CU Mark 2​Project Server 2010KB2817530Download
​14.0.7106.5000​August 2013 CU​SharePoint Server 2010KB2817570Download
​​August 2013 CU​SharePoint Foundation 2010KB2817594Download
​​August 2013 CU​Project Server 2010KB2817573Download
​14.0.7106.5002​August 2013 CU Mark 2​SharePoint Server 2010KB2825949Download
​14.0.7110.5000​October 2013 CU​SharePoint Server 2010KB2825786Download
​October 2013 CU​​SharePoint Foundation 2010KB2825824Download
​October 2013 CU​Project Server 2010KB2825793Download
​14.0.7113.5000December 2013 CU​SharePoint Server 2010KB2849971 Download
December 2013 CU​SharePoint Foundation 2010KB2849990Download
​14.0.7113.5002December 2013 CU​Project Server 2010KB2849972Download
​14.0.7116.5000​February 2014 CU​SharePoint Server 2010KB2863913Download​​
​February 2014 CU​SharePoint Foundation 2010KB2863938Download
​February 2014 CU​Project Server 2010KB2863917Download
​14.0.7121.5004​April 2014 CU​SharePoint Server 2010KB2878250Download
14.0.7121.5000​April 2014 CU​SharePoint Foundation 2010KB2878270Download
​April 2014 CU​​Project Server 2010​KB2878253​Download
​14.0.7123.5000MS14-022​SharePoint 2010KB2952166​​Links in KB​​
​14.0.7125.5002​June 2014 CU​SharePoint Server 2010KB2880972Download​​​
​​June 2014 CU​SharePoint Foundation 2010KB2880975Download
​​June 2014 CU​Project Server 2010KB2880974Download
​ 14.0.7128.5001​July 2014 CU​​SharePoint Server 2010KB2883005Download
​​July 2014 CU​​SharePoint Foundation 2010KB2883026Download
​​July 2014 CU​Project Server 2010​No patch
​ 14.0.7130.5000​August 2014 CU​SharePoint Server 2010KB2889831Download
​​August 2014 CU​SharePoint Foundation 2010KB2889825Download
​​August 2014 CU​Project Server 2010​No patch
​14.0.7132.5000September 2014 CU​SharePoint Server 2010KB2883103Download
September 2014 CU​​SharePoint Foundation 2010KB2889932Download
September 2014 CU​Project Server 2010KB2883006Download
​ 14.0.7134.5000​October 2014 CU​SharePoint Server 2010KB2899490Download
​SharePoint Foundation 2010​None​None
​Project Server 2010 (1/2)KB2899485Download
​Project Server 2010 (2/2)KB2880539Download
​14.0.7137.5000​November 2014 CU​SharePoint Server 2010KB2899478Download
​SharePoint Foundation 2010KB2889933Download
​Project Server 2010KB2899479Download
14.0.7140.5000​December 2014 CU​​SharePoint Server 2010KB2899583Download
​SharePoint Foundation 2010KB2899585Download
​Project Server 2010KB2899587
​14.0.7143.5001​February 2015 CU​SharePoint Server 2010KB2899558Download​​
​SharePoint Foundation 2010KB2910904Download
​Project Server 2010KB2899557Download
​14.0.7145.5000​March 2015 CU​SharePoint Server 2010KB2956201Download
​SharePoint Foundation 2010KB2956208Download
​Project Server 2010KB2956198Download
​14.0.7147.5000​April 2015 CU​SharePoint Server 2010KB2965294Download
​SharePoint Foundation 2010KB2965241
​Project Server 2010KB2965293Download
​14.0.7149.5000​May 2015 CU​SharePoint Server 2010KB3015569
​​SharePoint Foundation 2010KB3017815
​Project Server 2010KB2999496Download
​​14.0.7151.5000​June 2015 CU​​SharePoint Server 2010 Download​​
​SharePoint Foundation 2010 Download

​Project Server 2010 Download
14.0.7153.5000​July 2015 CU​SharePoint Server 2010KB3054975 ​Bugs, Notes, and Regressions
​SharePoint Foundation 2010KB3054983
​Project Server 2010KB3054972
14.0.7155.5000​August 2015 CU​SharePoint Server 2010KB3055040 ​Bugs, Notes, and Regressions
​SharePoint Foundation 2010KB3055049
​Project Server 2010KB3055038
​14.0.7157.5000September 2015 CU​SharePoint Server 2010KB3085521Download​Bugs, Notes, and Regressions
​SharePoint Foundation 2010KB3085530 ​
​Project Server 2010KB3085517Download
​14.0.7160.5000​October 2015 CU​SharePoint Server 2010KB3085603Download​Bugs, Notes, and Regressions
​SharePoint Foundation 2010KB3085613Download
​Project Server 2010KB3085598Download
​14.0.7162.5000​November 2015 CU​SharePoint Server 2010KB3101534Download​Bugs, Notes, and Regressions
​​SharePoint Foundation 2010KB3101547​​Download
​​Project Server 2010KB3101530Download
​14.0.7164.5000​December 2015 CU​SharePoint Server 2010KB3114408Download​Bugs, Notes, and Regressions
​SharePoint Foundation 2010KB3114418Download
​Project Server 2010KB3114405Download
​14.0.7165.5000​January 2016 CU​​SharePoint Server 2010​None​Bugs, Notes, and Regressions
​SharePoint Foundation 2010​None
​Project Server 2010KB3114556Download
​February 2016 CU​​SharePoint Server 2010​None​Bugs, Notes, and Regressions
​SharePoint Foundation 2010​None
​Project Server 2010​None
​14.0.7167.5000​March 2016 CU​​SharePoint Server 2010KB3114882Download
​SharePoint Foundation 2010KB3114886Download​Requires Feb 2016 CU installation
​Project Server 2010KB3114876Download
​14.0.7168.5000​April 2016 CU​​SharePoint Server 2010KB3114995Download​Bugs, Notes, and Regressions
​SharePoint Foundation 2010​None
​Project Server 2010KB3114992Download
​14.0.7169.5000​May 2016 CUSharePoint Server 2010​KB3115126Download
​​SharePoint Foundation 2010​None
​​Project Server 2010KB3115122Download​
​14.0.7170.5000​June 2016 CU​​​SharePoint Server 2010KB3115245Download
​​SharePoint Foundation 2010​None
​​Project Server 2010KB3115242Download​
​14.0.7171.5002​July 2016 CU​​​SharePoint Server 2010KB3115319
​SharePoint Foundation 2010​​KB3114890​​Download
​​Project Server 2010KB3115316Download​
​14.0.7173.5000​September 2016 CU​SharePoint Server 2010KB3115473Download
​​SharePoint Foundation 2010KB3115477Download
​Project Server 2010KB3115470Download​
​14.0.7174.5001​October 2016 CU​​​SharePoint Server 2010KB3118387Download
​​SharePoint Foundation 2010​None
​​Project Server 2010KB3118383Download​
​14.0.7176.5000​November 2016 CU​​​SharePoint Server 2010KB3127957Download​
​SharePoint Foundation 2010​None
​​Project Server 2010KB3127952​Download​
​14.0.7177.5000​​December 2016 CU​SharePoint Server 2010KB3128036Download
​SharePoint Foundation 2010KB3118391Download
​​Project Server 2010
​14.0.7179.5000​March 2017 CU​SharePoint Server 2010KB3141545Download
​​SharePoint Foundation 2010​None
​​Project Server 2010KB3141541​​Download​
​14.0.7180.5001April 2017 CU​SharePoint Server 2010​KB3191846Download
​​SharePoint Foundation 2010​None
​​Project Server 2010​KB3191842Download​
​14.0.7182.5000​June 2017 CU​SharePoint Server 2010KB3191905Download
​SharePoint Foundation 2010​None
​Project Server 2010KB3191903Download​
​14.0.7183.5000​July 2017 CU​​SharePoint Server 2010KB3213634Download
​SharePoint Foundation 2010​None
​​Project Server 2010KB3213629Download​
​14.0.7186.5000​August 2017 CU​​​SharePoint Server 2010KB2920815Download​
​​SharePoint Foundation 2010​None
​​​Project Server 2010KB2956055Download​
​14.0.7188.5001​September 2017 CU​SharePoint Server 2010KB4011058Download
​SharePoint Foundation 2010​None
​Project Server 2010KB4011057Download​
​14.0.7189.5001​October 2017 CU​SharePoint Server 2010KB4011195Download
​​SharePoint Foundation 2010​None
​Project Server 2010KB4011192Download​
​14.0.7190.5000​November 2017 CU​​SharePoint Server 2010KB4011272Download
​​​SharePoint Foundation 2010​None
​​Project Server 2010KB4011269Download​
​December 2017 CU​None
​14.0.7192.5000​January 2018 CU​​​SharePoint Server 2010KB4011616Download
​SharePoint Foundation 2010KB3141547Download
​Project Server 2010KB4011613Download​
​February 2018 CU​​None
​14.0.7196.5000​March 2018 CU​​​​SharePoint Server 2010KB4011710Download
​​SharePoint Foundation 2010​None
​Project Server 2010KB4011708Download
​14.0.7197.5000​April 2018 CU​​​​SharePoint Server 2010KB4018361Download
​​SharePoint Foundation 2010​None
​​Project Server 2010​KB4018358Download
​14.0.7209.5000​May 2018 CU​SharePoint Server 2010KB4022143Download
​​​SharePoint Foundation 2010​None
​Project Server 2010​KB4022140Download​
​14.0.7210.5000​June 2018 CU​​SharePoint Server 2010​KB4022204Download
​SharePoint Foundation 2010​None
​Project Server 2010​KB4022201Download​

​14.0.7212.5000 ​August 2018 CU​​SharePoint Server 2010​KB4032221Download
​SharePoint Foundation 2010​None
​Project Server 2010​​KB4092438Download​

​14.0.7213.5000​September 2018 CU​​SharePoint Server 2010​​KB4227169Download
​SharePoint Foundation 2010​None
​Project Server 2010​KB4092484Download​

Wednesday, October 25, 2017

Adding Custom Action to SharePoint Online site

In this post, I'm providing the SPO powershell script which you can run from SPO management shell to add a new custom action to specific site.

You can use this script to render scripts on specific pages inside a site and  there by add any new options to users/ hide any option from end users.

Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Publishing.dll"
# Authenticate with the SharePoint site.
$actionName = "EM_SPO_JOSPODELWEB_JS_Injection"
$actionType = "ScriptLink"
$actionSourceFile =""
$siteUrl = Read-Host -Prompt "Enter web url:"
$username = Read-Host -Prompt "Enter Username:"
$password = Read-Host -Prompt "Enter password" -AsSecureString
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)
# SharePoint Online
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
$ctx.Credentials = $credentials
$rootWeb = $ctx.Web
$actions = $rootWeb.get_userCustomActions()
$actionsToDelete = @()
foreach($action in $actions)
if($action.get_description() -eq $actionName -and $action.get_location() -eq $actionType) {
Write-Host "Action found:" $action.get_description() -foregroundcolor white -backgroundcolor Green
$actionsToDelete += $action
foreach($actionToDelete in $actionsToDelete) {
Write-Host "Action deleted" -foregroundcolor white -backgroundcolor Green
Write-Host "Installing action"  -foregroundcolor white -backgroundcolor Green
$newAction = $actions.add();
$scriptBlock = 'var headIDDetails = document.getElementsByTagName("head")[0];var newScriptDetails = document.createElement("script");newScriptDetails.type = "text/javascript";newScriptDetails.src="';
$scriptBlock += $actionSourceFile + '?ver=' + (Get-Date) ;
$scriptBlock += '";headIDDetails.appendChild(newScriptDetails);';
Write-Host "Action" $newAction.Description "installed" -foregroundcolor white -backgroundcolor Green

Wednesday, June 21, 2017

Avoid getting throttled or blocked in SharePoint Online

What is throttling?

SharePoint Online uses throttling to maintain optimal performance and reliability of the SharePoint Online service. Throttling limits the number of user actions or concurrent calls (by script or code) to prevent overuse of resources.
That said, it is extremely rare for a user to get throttled in SharePoint Online. The service is robust, and it is designed to handle very high volume. If you do get throttled, 99% of the time it is because of custom code. That doesn't mean that there aren't other ways to get throttled, just that they are less common. For example you spin up 10 machines and have a sync client going on all 10. On each sync 1TB of content. This would likely get you throttled.

What happens when you get throttled in SharePoint Online?

When a user exceeds usage limits, SharePoint Online throttles any further requests from that user account for a short period. All user actions are throttled while the throttle is in effect.
  • For requests that a user performs directly in the browser, SharePoint Online redirects you to the throttling information page, and the requests fail.
  • For all other requests, including CSOM or REST calls, SharePoint Online returns HTTP status code 429 ("Too many requests"), and the requests fail.
If the offending process continues to exceed usage limits, SharePoint Online might completely block the process; in this case, you may see HTTP status code 503 ("Service unavailable"), and we'll notify you of the block in the Office 365 Message Center. The error message is shown below:

503 Server unavailable message.

Common throttling scenarios in SharePoint Online

The most common causes of per-user throttling in SharePoint Online are client-side object model (CSOM) or Representational State Transfer (REST) code that performs too many actions too frequently.
  • Sporadic traffic
    Not a lot of traffic at any one time, but enough over time that you run in and out of throttling in an episodic way.
    • For example, after migrating files to SharePoint Online, you run a custom CSOM or REST script to update metadata on the files. The CSOM/REST script is updating a large number of files at a very high frequency, which triggers throttling. Similarly, an autocomplete UI widget using REST services, making too many calls to lists during each end user operation, may also cause throttling, depending on what other operations are consuming resources at the same time.
  • Overwhelming traffic
    A single process dramatically exceeds throttling limits, continually, over a long time period.
    • You used web services to build a tool to synchronize user profile properties. The tool updates user profile properties based on information from your line-of-business (LOB) human resources (HR) system. The tool makes calls at too high a frequency.
    • You're running a load-testing script on SharePoint Online and you get throttled. Load testing is not allowed on SharePoint Online.
    • You customized your team site on SharePoint Online, for example, by adding a status indicator on the Home page. This status indicator updates frequently, which causes the page to make too many calls to the SharePoint Online service - this triggered throttling.

Why can't you just tell me the exact throttling limits?

Setting and publishing exact throttling limits sounds very straightforward, but in fact, it's not the best way to go. We continually monitor resource usage on SharePoint Online. Depending on usage, we fine-tune thresholds so users can consume the maximum number of resources without degrading the reliability and performance of SharePoint Online. That's why it's so important for your CSOM or REST code to include incremental back off to handle throttling; this lets your code run as fast as possible on any given day, and it lets your code back off "just enough" if it hits throttling limits. The code samples later in this article show you how to use incremental back off.

Best practices to handle throttling

  • Reduce the number of operations per request
  • Reduce the frequency of calls
  • Use incremental back off to reduce the number and frequency of calls until no more throttling occurs
Incremental back off uses progressively longer waits between retries before trying again to run the code that was throttled. You can use the GitHub code samples, later in this article, written as extension methods, to add incremental back off to your code.
Backing off is the fastest way to handle being throttled because SharePoint Online continues to log resource usage while a user is being throttled. In other words, aggressive retries work against you because even though the calls fail, they still accrue against your usage limits. The faster you back off, the faster you'll stop exceeding usage limits. 

GitHub CSOM code samples: SharePoint Online Throttling

Before you run this code sample:
  • Open Program.cs and enter the following information in the Main method:
    • Your Office 365 Developer account credentials.
    • The URL of your Office 365 Developer Site.
    • The name of a test document library on your Office 365 Developer Site.
  • If you receive an error stating that the App.Config file is invalid, go to Solution Explorer, right click App.config, and choose Exclude From Project.
Core.Throttling runs as a console application using a user-only authorization policy, which means this code sample uses the permissions of the current user. In the Main method in Program.cs, a while loop repeatedly creates new folders in the test document library. A call is then made to ctx.ExecuteQueryWithExponentialRetry, which uses CSOM to perform the ExecuteQuery method. ExecuteQueryWithExponentialRetry is an extension method on the ClientContext object, and is defined in ClientContextExtension.cs.
If SharePoint Online throttles the ExecuteQuery statement, ExecuteQueryWithIncrementalRetry starts the incremental back off technique by:
  • Catching a WebException and checking the HttpWebResponse.StatusCode. If SharePoint Online throttled the ExecuteQuery statement, the HttpWebResponse.StatusCode is 429.
  • The current thread is suspended for the period specified in backoffInterval.
  • When the current thread resumes, the backoffInterval is doubled and the number of retries performed ( retryAttempts ) is incremented. By doubling backoffInterval your code suspends activity for a longer period of time before retrying the code that was throttled by SharePoint Online.
  • The process is repeated until either the ExecuteQuery statement is successful, or the number of allowed retries ( retryCount ) is exceeded.

CSOM Code sample: Incremental back off and retry (calls ExecuteQueryWithIncrementalRetry method, later in this article)

using (var ctx = new ClientContext(serverUrl))
//Provide account and pwd for connecting to the source
var passWord = new SecureString();
foreach (char c in password.ToCharArray()) passWord.AppendChar(c);
ctx.Credentials = new SharePointOnlineCredentials(login, passWord);
int number = 0;
// This loop will be executed 1000 times, which will cause throttling to occur
while (number < 1000)
// Try to create new folder based on Ticks to the given list as an example process
var folder = ctx.Site.RootWeb.GetFolderByServerRelativeUrl(listUrlName);
folder = folder.Folders.Add(DateTime.Now.Ticks.ToString());
// Extension method for executing query with throttling checks
ctx.ExecuteQueryWithIncrementalRetry(5, 30000); //5 retries, with a base delay of 30 secs.
// Status indication for execution.
Console.WriteLine("CSOM request successful.");
// For loop handling.
number = number + 1;
catch (MaximumRetryAttemptedException mex)
// Exception handling for the Maximum Retry Attempted

CSOM Code sample: ExecuteQueryWithIncrementalRetry method

public static void ExecuteQueryWithIncrementalRetry(this ClientContext context, 
int retryCount, int delay)
            int retryAttempts = 0;
            int backoffInterval = delay;
            if (retryCount <= 0)
                throw new ArgumentException("Provide a retry count greater than zero.");
           if (delay <= 0)
                throw new ArgumentException("Provide a delay greater than zero.");
           while (retryAttempts < retryCount)
                catch (WebException wex)
                    var response = wex.Response as HttpWebResponse;
                    if (response != null &amp;&amp; response.StatusCode == (HttpStatusCode)429)
                        Console.WriteLine(string.Format("CSOM request exceeded usage limits. 
Sleeping for {0}
 seconds before retrying.", backoffInterval));
                        //Add delay.
                        //Add to retry count and increase delay.
                        backoffInterval = backoffInterval * 2;
            throw new MaximumRetryAttemptedException(string.Format("Maximum retry attempts {0}, 
have been attempted.", retryCount));

What should you do if you get blocked in SharePoint Online?

Blocking is the most extreme form of throttling. We rarely ever block a tenant,
unless we detect long-term, extremely excessive traffic that may threaten the overall 
health of the SharePoint Online service. We apply blocks to prevent excessive traffic from
 degrading the performance and reliability of SharePoint Online. A block - which is usually
 placed at the tenancy level - prevents the offending process from running until you fix the problem. 

If we block your subscription, you must take action to modify the offending processes before
 the block can be removed.

If we block your subscription, you'll see HTTP status code 503, and we'll notify you of the
 block in the Office 365 Message Center. The message describes what caused the block, provides
 guidance on how to resolve the offending issue, and tells you who to contact to get the block removed.

Wednesday, June 7, 2017

PowerShell to automate turning on two-step verification in azure

To change the state using Azure AD PowerShell, you can use the following. You can change $st.State to equal one of the following states:
  • Enabled
  • Enforced
  • Disabled
Note: It's not recommended to move users directly from the Disable state to the Enforced state. Non-browser-based apps will stop working because the user has not gone through MFA registration and obtained an app password. If you have non-browser-based apps and require app passwords, we recommend that you go from a Disabled state to Enabled. This allows users to register and obtain their app passwords. After that, you can move them to Enforced.

PowerShell would be an option for bulk enabling users. Currently there is no bulk enable feature in the Azure portal and you need to select each user individually. This can be quite a task if you have many users. By creating a PowerShell script using the following, you can loop through a list of users and enable them

$st = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationRequirement
    $st.RelyingParty = "*"
    $st.State = "Enabled"
    $sta = @($st)
    Set-MsolUser -UserPrincipalName -StrongAuthenticationRequirements $sta

Below is an example

$users = "",""
foreach ($user in $users)
    $st = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationRequirement
    $st.RelyingParty = "*"
    $st.State = "Enabled"
    $sta = @($st)
    Set-MsolUser -UserPrincipalName $user -StrongAuthenticationRequirements $sta

Azure Multi-Factor Authentication in the cloud

This post walks through how to get started using Azure Multi-Factor Authentication in the cloud (office 365)

The following provides information on how to enable users using the Azure Classic Portal

Enable Azure Multi-Factor Authentication

As long as your users have licenses that include Azure Multi-Factor Authentication, there's nothing that you need to do to turn on Azure MFA. You can start requiring two-step verification on an individual user basis. The licenses that enable Azure MFA are:
  • Azure Multi-Factor Authentication
  • Azure Active Directory Premium
  • Enterprise Mobility + Security
If you don't have one of these three licenses, or you don't have enough licenses to cover all of your users, that's ok too. You just have to do an extra step and Create a Multi-Factor Auth Provider in your directory.

Turn on two-step verification for users

To start requiring two-start verification on for a user, change the user's state from disabled to enabled. User States are as below

User accounts in Azure Multi-Factor Authentication have the following three distinct states:
StateDescriptionNon-browser apps affected
DisabledThe default state for a new user not enrolled Azure Multi-Factor Authentication (MFA).No
EnabledThe user has been enrolled in Azure MFA, but has not registered. They will be prompted to register the next time they sign in.No. They continue to work until the registration process is completed.
EnforcedThe user has been enrolled and has completed the registration process for Azure MFA.Yes. Apps require app passwords.
Use the following procedure to enable MFA for your users.

To turn on multi-factor authentication

  1. Sign in to the Azure classic portal as an administrator.
  2. On the left, click Active Directory.
  3. Under Directory, select the directory for the user you wish to enable. 
  4. Click Users at the top

  5. At the bottom of the page, click Manage Multi-Factor Auth. A new browser tab opens.
  6. Find the user that you wish to enable for two-step verification. You may need to change the view at the top. Ensure that the status is disabled. 
  7. Place a check in the box next to their name and click Enable
  8. Click enable multi-factor auth
  9. You can now notice that the user's state has changed from disabled to enabled
Once you enabled, inform the user via email as the next time they try to sign in, they will be asked to enrol their account for two-step verification (MFA). Once they start using two-step verification, they would also need to set up app passwords to avoid getting locked out of non-browser apps.

Monday, June 5, 2017

Create Azure Multi-Factor Auth Provider

Two-step verification is available by default for global administrators who have Azure Active Directory, and Office 365 users

An Azure Multi-Factor Authentication Provider is used to take advantage of features provided by the full version of Azure MFA. It is for users who do not have licenses through Azure MFA, Azure AD Premium, or EMS. Azure MFA, Azure AD Premium, and EMS include the full version of Azure MFA by default. If you have licenses, then you do not need an Azure Multi-Factor Authentication Provider.

Create a Multi-Factor Authentication Provider

Use the following steps to create an Azure Multi-Factor Auth Provider.
  1. Sign in to the Azure classic portal as an administrator.
  2. On the left, select Active Directory.
  3. On the Active Directory page, at the top, select Multi-Factor Authentication Providers
  4. Click New at the bottom
  5. Select Multi-Factor Auth Provider under App Services
  6. Select Quick Create and provide below details for MFA
    1. Name – The name of the Multi-Factor Auth Provider.
    2. Usage Model – Choose one of two options:
      • Per Authentication – purchasing model that charges per authentication. Typically used for scenarios that use Azure Multi-Factor Authentication in a consumer-facing application.
      • Per Enabled User – purchasing model that charges per enabled user. Typically used for employee access to applications such as Office 365. Choose this option if you have some users that are already licensed for Azure MFA.
    3. Directory – The Azure Active Directory tenant that the Multi-Factor Authentication Provider is associated with. Be aware of the following:
      • You do not need an Azure AD directory to create a Multi-Factor Auth Provider. Leave the box blank if you are only planning to use the Azure Multi-Factor Authentication Server or SDK.
      • The Multi-Factor Auth Provider must be associated with an Azure AD directory to take advantage of the advanced features.
      • Azure AD Connect, AAD Sync, or DirSync are only a requirement if you are synchronizing your on-premises Active Directory environment with an Azure AD directory. If you only use an Azure AD directory that is not synchronized, then this is not required. 
  7. Once you click create, the Multi-Factor Authentication Provider is created and you should see a message stating: Successfully created Multi-Factor Authentication Provider. Click Ok