Wednesday, 16 March 2016

Set Mandatory Anonymous Links Expiration Duration in SharePoint Online

Recently added feature to SharePoint Online allows administrators to set the maximum expiration duration for documents shared via anonymous shared links. The maximum expiration period for anonymous shared links can be set by setting the RequireAnonymousLinksExpireInDays parameter of Set-SPOTenant cmdlet from SharePoint Online Management shell. The mandatory expiration duration is set at tenant level and therefore will affect all the links that are shared anonymously.

If the maximum expiration duration is not set users would be able to create anonymous share links 
that can be set to any date or create links that would never expires.

Below are the steps for setting mandatory expiration for anonymous links

1. Connect to SharePoint online tenant from SharePoint Online management shell. Version 16.9.4915.1200 of SharePoint Online Management shell is required for this feature. You can download it from here

2. Execute the Set-SPOTenant cmdlet with the RequireAnonymousLinksExpireInDays and the value for expiration duration 
E.g. Set-SPOTenant RequireAnonymousLinksExpireInDays 30

The value range for expiration duration is 0 to 730

3. Once the mandatory expiration duration is set , when users try to share a document with anonymous link the expiration date would be automatically set to the value of current date plus the expiration duration.

4. Users can change the expiration date by clicking the Change link and providing a value for expiration days.

5. If a user tries to set a value more than the maximum duration set, an error indicating that the expiration date cannot exceed the organizational policy would be shown.

6. To reset the expiration duration to default execute the Set-SPOTenant cmdlet with a value of 0 to RequireAnonymousLinksExpireInDays parameter.

Tuesday, 1 March 2016

Create Power BI Reports from Excel Files Stored in SharePoint Online Team Sites

As part of recent Power BI service update the ability to use excel files stored in SharePoint Online team sites was announced. This blog post explains the steps for creating Power BI report from excel file stored in SharePoint online tea site

1.       Logon to
2.       Click on Get Data from left navigation
3.       In the Get Data page click Get link in the files source

4.       In the files page click SharePoint – Team Sites as the source

5.       You will be prompted to enter the URL of the SharePoint site. Enter the URL of the SharePoint site like and click Connect button.

6.       You will be presented from the list of libraries to choose from. Click the library in which you have excel file to be used for Power BI. If you have the file within a folder then select the folder.

7.       List of Excel files in the library or folder will be listed. Select the Excel file you want to use as source and click the Connect button at top right.

8.       From the Choose how to connect page click Import button in Import Excel data into Power BI option

9.       After processing your Excel file Power BI will create a new data set.

10.   You will then be create charts and dashboards from the data set created from Excel file.