Category Archives: Feature Overview

A history of extensibility in SharePoint and how to choose a model

I recently wrote a post for my employer about the recent history of SharePoint extensibility models. It also touches on how we as company settled on the model with which we are currently delivering our Intranet/Digital-Workplace solution. I discuss the Feature Framework, Farm and Sandboxed Solutions, SharePoint Add-in Model, SharePoint Framework, Remote Provisioning, and more.

Check it out here: A history of extensibility in SharePoint and how Fresh chose a model

SharePoint extensibility model, Generic image

Azure Service Management REST API vs Azure API Management REST API

Do not be confused! The Azure Service Management REST API and the Azure API Management REST API are completely different. Yes, they may have confusingly similar names but they service completely different purposes, support different authentication protocols, and are surfaced via different endpoint domains.

Question mark

The Azure Service Management REST API

What can I do with it?

This service supports actions for managing Azure resources such as web apps or storage accounts. Think of it as an endpoint for the actions you might otherwise perform manually via the (Classic or New) Azure Portal.

What do the endpoints look like?

Service request URIs will be of the form: https://management.azure.com /subscriptions/…

How does authentication work?

Service authentication is achieved using OAuth via the use of a Bearer access token in the Authorization header. The app principal is an Azure Active Directory application. The AAD app must be given ‘permissions to other applications’ for ‘Windows Azure Service Management API’. As the only grant-able permissions are ‘delegated permissions’ (App+User) rather than ‘application permissions’ (App-only), this API can only be called from within a user context and not, for example, from the context of a web job.

Configuring Azure AD App Permissions
Configuring AAD App Permissions

The Azure API Management REST API

What can I do with it?

The API Management Service supports publishing APIs to consumers by providing an ID and secret key ‘shared signature’ authentication mechanism very similar to that used by Amazon or Instagram for their (public, pending approval) APIs. An API Management Service instance provides benefits like management of users, groups, products (endpoints), and subscriptions. There is then a REST API for managing these users, groups, products, and subscription that the API Management Service provides – this is referred to as the API Management REST API.

What do the endpoints look like?

Service request URIs will be of the form: https://{servicename}.management .azure-api.net/…

How does authentication work?

Service authentication is achieved via the use of a Shared Access Signature access token in the Authorization header. The identifier and secret key required to generated a request signature are available via API Management Service instance. Access to the API must be explicity allowed by checking the ‘Enable API Management REST API’ via the API Management Service publisher portal.

Enable API Management REST API
Enable API Management REST API
Credit to Microsoft Azure Documenation

Read more

Ok, so just reading the above really won’t be enough to get you firing off requests but hopefully it will provide enough clarity that you fully understand how to interact with which API.

Service Management REST API Reference

API Management REST API

Vaguely related, I’ve recently blogged about posting authenticated requests to the Amazon Product Advertising API in .NET

I will post about using the Service Management API along will app configuration and full code samples for authentication in the near future. I will link to that post from here.

Paul.

Upload Centre vs OneDrive Synch

The following is quick summary of both the Office Upload Centre and the OneDrive for Business Synch Client and a discussion of why is it safe to have them both running simultaneously.

Office Upload Centre
Upload Centre manages the offline cache when SharePoint documents are opened in the appropriate client application. By integrating with Office it enables co-authoring and some other ‘integration’ features such as sharing from the Office client applications and ensures that changes are synched back to SharePoint even if the connection is lost.

Upload Centre in the windows tray
Upload Centre in the windows tray
Office Upload Centre
Office Upload Centre

OneDrive for Business Synch Client
OneDrive synch ensures that OneDrive documents which have been synchronised to a local folder remain the same (synchronised). It also acts as the synch client which is used for the synchronisation of other SharePoint content such as a Document Library in team site. It does not integrate directly with Office applications. NOTE: Microsoft are upgrading the synch engine to improve reliability but only for OneDrive (but it is probably safe to assume that it will reach the rest of SharePoint eventually).

OneDrive Synch
OneDrive Synch

When do they meet?
The closest these features get to interacting with one another is when a document stored in OneDrive is opened in the client application. In this scenario it is Upload Centre that will ensure changes are persisted to the document. Once this occurs it is OneDrive Synch that ensures that this change is replicated to the synchronised copy stored locally. If the document is edited in another way then Upload Centre will not be involved.
Both products are a core part of the Microsoft cloud suite and although you can disable them, you can also be confident that they will work together.

Paul.

SharePoint licencing limitations: Standard vs Enterpise Features and Kiosk Users

When discussing Office 365 licencing there are a number of things that as an architect or developer you must be aware of.

EDIT: A handy Excel tool for checking which features are available for different licence types can be found here: Office 365 service comparison

Image of Buying kiosk licences
Buying kiosk licences

Creating solutions for limited users
Kiosk users are the cheap users will the greatest restrictions. However the limitations placed on these users really are quite manageable in many circumstances and shouldn’t cause you particular worry when developing a solution for these users. The key points to remember when providing a solution to these users is:

  • They don’t have a user profile. They can still view the ‘My Settings’ page, but not the ‘About Me’ page. These users still have the full set of user profile properties which can be set by an administrator or via AD synch and programmed against.
  • They can only use Office Web Apps in READ mode. They cannot edit documents with a client version of the correct Office application. Kiosk users from a K2 licence (opposed to K1) can also edit documents using OWA.
  • They can’t be administrators at the tenant or site collection level. However they can be granted Full Control permissions.

Be aware of the feature set available in Production
Many features will not be present or will not work under some licencing schemes. The primary issue which I have encountered is around content rollup. Licences which do not support the Enterprise feature set do not support the Content Search Web Part. You can use the Results Script Web Part instead, but remember that the display templates used are not transferable. The Content Search Web Part display templates reference the Srch javascript namespace which will not be present if using the Results Script Web Part.
There are obviously many other Enterprise features which I won’t mention explicitly but have a browse over the below table:

 

Developer features Only in SharePoint Server 2013—Enterprise Edition
Access Services Yes
BCS: Rich Client Integration Yes
BCS: Tenant-level external data log Yes
Custom Site Provisioning Yes
InfoPath Forms Services Yes
Analytics Platform Yes
Improved Self-Service Site Creation Yes
eDiscovery Yes
Preservation hold library Yes
Video Search Yes
WCM: Catalog Yes
WCM: Cross-site publishing Yes
WCM: Faceted navigation Yes
WCM: Image Renditions Yes
WCM: Multiple Domains Yes
WCM: Topic Pages Yes
Business Intelligence Center Yes
Calculated Measures and Members Yes
Data Connection Library Yes
Decoupled PivotTables and PivotCharts Yes
Excel Services Yes
Field list and Field Support Yes
Filter Enhancements Yes
Filter Search Yes
PerformancePoint Services Yes
PerformancePoint Services (PPS) Dashboard Migration Yes
Power View Yes
PowerPivot Yes
Quick Explore Yes
Scorecards & Dashboards Yes
Timeline Slicer Yes
Visio Services Yes
Content Search Web Part Yes
Custom entity extraction Yes
Extensible content processing Yes
Query rules—advanced actions Yes
Search vertical: “Video” Yes
Tunable Relevancy Yes

Custom document reports using OOTB SharePoint

There is a useful feature of SharePoint that provides site collection wide reporting across documents (and items). I’m referring to ‘Site Content and Structure Reports’ and it allows you to view a handful of OOTB reports as well as create custom reports (al beit somewhat limited). You may not want to provide access to this page for many users but it can be a handy IT feature if nothing else. I have an example of a “documents checked out to any user” report at the end of this blog.

The Content and Structure page can be found under Site Settings in SharePoint 2013 [or in the Site Actions drop down in SharePoint 2010]
The Content and Structure page can be found under Site Settings in SharePoint 2013 [or in the Site Actions drop down in SharePoint 2010]

The default reports are listed in the next image and some can be quite useful like ‘Checked out to me’ and ‘My tasks’ although often a customised solution has more elegant approaches to displaying this information elsewhere. The good bit is that it is very easy to make your own assuming you know CAML.

The reports can be run using the View menu on the Content and Structure page
The reports can be run using the View menu on the Content and Structure page

There’s a link to the list of these report definitions from the site collection root site (/Reports%20List/AllItems.aspx). Here you can create new report definitions just by adding a new item to the list. You merely need to define the CAML which will then return results from every library/list in site collection.

The set of Content and Structure report items the come with SharePoint
The set of Content and Structure report items the come with SharePoint

As an example, I have created a new report to return all checked out documents no matter who they are checked out to by using the following CAML:
<Where><IsNotNull><FieldRef Name="CheckoutUser" LookupId="TRUE"/></IsNotNull></Where>

Report: Checked out to anyone
Report: Checked out to anyone

It is important to note that you should leave both of the ‘Resource Id’ column blank. If you populate these columns with valid resource Ids then the correspoding resources will overwrite the reports CAML and description.
Also if you would like to restrict the query to a specific sub-set of list types then you can use the ‘CAML List Type’ field to enter a list definition ID (a full list of the defaults can be found here) like so:
<Lists ServerTemplate="101"/>

Another handy use of this is to create a report all of all pages awaiting approval. This can be achievd with a CAML List Type of: <Lists ServerTemplate="850"/> and a CAML Query of: <Where><And><Eq><FieldRef ID="{fdc3b2ed-5bf2-4835-a4bc-b885f3396a61}"></FieldRef><Value Type="Number">3</Value></Eq><IsNull><FieldRef Name="CheckoutUser" LookupId="TRUE"/></IsNull></And></Where>

Note the List Template ID of 850 representing Pages Library.

Hope you found this useful.

Developer Overview of Office 2013 Apps

After attending the SharePoint Conference a couple of weeks ago in Las Vegas I was inspired to spend some time with Office Apps. Office Apps allow you to show a web page within an Office program. Literally, it is as basic as an iFrame within Word (or Excel etc) and a JavaScript library that provides an API into Office. An xml manifest file defines the app web URL and the permissions the app requires (plus some other settings) and is the only thing that the client application is required to install.

The Anatomy of an Office App – Thanks to Microsoft for the image

I’ll start with a quick overview in case you aren’t aware of what’s possible. I use the term ‘document’ generically to refer to any Office file type (docx, pptx, xlsx) unless I specify otherwise.

 

Office App Shapes

Office Apps come in three distinct ‘shapes’ (this is Microsoft’s term, read: types).

  1. Task Pane: This app shape is housed in a panel outside of the document. Think of the ‘Solution Explorer’ in Visual Studio. You can influence the document via the app but the app doesn’t constitute part of the document itself. This shape is very flexible; it can run in any of Word, PowerPoint, Excel and Project. That is; the exact same app can be published for use in any of these programs, unmodified. You will have to consider the programs you decide to support as there are some discrepancies that will need to be taken into account. An example of this is the DocumentSelectionChanged event which fires upon each key stroke in Word but only upon changing cell selection in Excel. I imagine that this will be the most common app shape as it can provide powerful tools to help a user create/modify/research a document or complete related tasks without opening your browser in order to visit SharePoint

    A Task Pane App – Thanks to Microsoft for the image
  2. Content: This app shape sits ‘in’ the document, as part of the content. Think of a chart in Excel. In fact, if you had a desire to reinvent the wheel, you could create a content app that replicates chart functionally. Currently, content apps are only supported in Excel but this only a temporary limitation (during the conference sessions Microsoft made a point of this on multiple occasions). Content apps can provide an easy way to share content (you can email them!) or bring dynamic content into documents. Perhaps this shape could be used to create powerful dynamic coversheets with a lot more pizazz than Quick Parts provide.

    A Content App – Thanks to Microsoft for the image
  3. Mail: This app shape is very similar to the Task Pane shape except that it is for Outlook. It also provides a pretty cool visibility model where you are able to define rules (e.g. is the item a message or an event) which when satisfied makes the app appear. I’m not going to cover this app shape in more depth specifically, however the flexible nature of Office Apps means that the concepts I do cover will be transferable in most cases.

    A Mail App – Thanks to Microsoft for the image

 

Environment

In order to start to developing Office Apps you require Visual Studio 2012 (Express is fine) with Microsoft Office Developer Tool for Visual Studio 2012 and Office 2013. I was only using Office 2013 Preview and was able to develop apps fine with a couple of caveats. Firstly, the API is slightly different between versions (you should be using a different version of office.js and I assume the gap will only get greater as the API matures). An example of this is trying to read the current document – you have to use a different method for Preview. Secondly, I couldn’t debug my apps in Visual Studio. I’m not sure if I’m overlooking something or whether it’s a limitation of using Office Preview. I will edit this blog when I have a chance to investigate this issue fully. I should also mention that you need IE9+ installed although it needn’t be your default browser.

Starting a New Project

The ‘App for Office 2013’ Visual Studio template goes a long way to getting you started. Start a new project: File > New > Project, then Installed > Templates > Visual C# > Office/SharePoint > App for Office 2013. If you know you want to create a Task Pane App of Content App then select accordingly but in either case it is very simple to convert one to the other, you just have to make a few small modifications to the manifest xml file.

 

Converting App Shapes

The xsi:type parameter can be ‘TaskPaneApp’ or ‘ContentApp’ accordingly, Task Pane Apps don’t support the RequestedWidth or RequestedHeight elements and lastly (and temporarily) Content Apps only support the Capability element when its Name attribute is ‘Workbook’.

Limitations

You can’t draw iFrames in Office Apps. At first I thought this wasn’t an issue, but it does mean that you can’t just host some related SharePoint content in an app, you have to go to the effort of getting the content via a web service (possibly having to write the web service) and then handle rendering it.

You can’t change the document from the app. You can read, write and close the document but you can’t open another document. I can imagine (and really hope) that this may change in the future as it could allow users who spend a lot of time modifying documents to switch between documents hosted in a range of sites without leaving Office.

You can’t pass arguments to Office Apps. I had hoped that it would be possible to provide a URL that would launch a document, insert a specified app (or prompt to install it), and initiate the app with some provided data. Unfortunately it can’t be done (yet?).

 

Please subscribe.

 

Award Finalists

The extranet solution I have been working on over the past year has been selected as a finalist for ‘Best Intranet/Extranet Solution’ by the European SharePoint Community. The winner will be announced during the European SharePoint Conference in Copenhagen, Denmark at the start of February 2013.

Please check out the ‘GSM Association’ entry by clicking here and go ahead and vote for it if you like it.

ESPC

 

I’m not sure how the other entries even quality for this category – they don’t look like internet or extranet solutions to me.

Congratulations to the whole team at Concentra for getting this far – and good luck to us!