External users in Office 365

SharePoint Online in Office 365 provides access external users. From any site in SharePoint you can invite an external user by adding th email address either to the visitors or the members group. It is recommended that you use unique permissions when you create a subsite you want to share with external users. If you haven’t done this, break role inheritance and go to the url /_layouts/permsetup.aspx to create unique groups for the site.

First, create a new subsite with unique permissions. Let’s call it Customers.

Make sure three new groups are created for the site.

Go to Share site and add the email address of the user.

After clicking Share you will be notified the site has been shared with an external user. The person you have invited to the site receives an email that includes a link to accept the invitation. To accept the invitation, the invitee needs to provide an email address that is associated with a Microsoft account, or, if they’re an existing Office 365 customer, a Microsoft Online Services ID. If they don’t have an email address or a Microsoft account, they can create one for free.

The email address that is associated with the Microsoft account, the Hotmail, Live, or MSN address, or the Microsoft Online Services ID is the email address the person uses to log in to your SharePoint site. After login, the user will be added to the group.

The user claim for this Hotmail account is shown below.

To add the user to other groups on other sites, use the people and add the email address.

The people picker will probably neither be able to find the account nor will you be able to search for it, so you need to know the exact email address to add the user to other sites.

Highlights of SPC12

Here are my three quickies from SPC12.

Office 365 vs On-premise

Even though Microsoft claim a huge investment in SharePoint Server 2013, the main focus is in SharePoint Online and Office 365. There are still a few limitations what you can do in the cloud, things that can only be done on premise, but future releases will probably be the other way around. Go for the cloud if possible.

WCF is out, REST is in

The API for accessing /_api/client.svc (former /_vti_bin/client.svc) has been extended and most information can be pulled out using REST, which is fast and simple. When communication with SharePoint, use either REST or CSOM (Client-Server Object Model). There are few reasons for using WCF or any other method.

Consider hosting apps

The first two tips are simple guidelines. This is a call for concideration. When hosting an app there are three possible ways:

  • SharePoint hosted app
  • Autohosted app
  • Providerhosted app

Not only will these three methods convey various limitations on what you can do, they will also bring differnt concerns regarding authorization. This will be discussed more later.

Modify QuickLaunch of SharePoint web with Powershell

I had to modify the quicklauch for multiple webs. In this case Powershell is my friend. The action needed to be done was to show subwebs in QuickLaunch. If publishing feature is activated on web, this property can be set on /_layouts/AreaNavigationSettings.aspx.


With Powershell the property is a bit tricky to find. First, web need to create a PublishingWeb-object.

$pubWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)

Second, the CurrentIncludeSubSites property of the Navigation property must be set to true.

$pubWeb.Navigation.CurrentIncludeSubSites = $true

The complete function looks something like this.

[parameter(Mandatory = $true)][string]$Url

function Set-CurrentIncludeSubSites()
#Load assemblies
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
Add-PSSnapin "Microsoft.SharePoint.PowerShell"

$web = Get-SPWeb $Url

if ([Microsoft.SharePoint.Publishing.PublishingWeb]::IsPublishingWeb($web) -eq $true)
$pubWeb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
$pubWeb.Navigation.CurrentIncludeSubSites = $true

Set-CurrentIncludeSubSites -Url $Url

Save this as Set-CurrentIncludeSubSites.ps1 and run it with .\Set-CurrentIncludeSubSites.ps1 -Url http://myurl