Scenario

When using SharePoint 2013 Multi Tenant environment you may come across multiple issues. Below are very important and common issues I have had to troubleshoot till date.

Issue 1: error loading user profile

When users try to access SKYdrive and Newsfeed, they get the below error message:

Error 

Exception occurred loading user profile (/mysite/default.aspx): System.ArgumentNullException: Value cannot be null.  Parameter name: userProfileApplicationProxy

Solution

Here the site subscription is not added to the tenant site. To resolve the issue we need to follow below steps:

$sub = get-spsitesubscription "yourGUID";
set-spsite -identity $site -SiteSubscription $sub

Issue 2 : apps turned off

When users try to add an app to their SharePoint site, they get below error

Error

"apps are turned off if you know who runs the server tell them to enable apps"

Solution

Every Tenant Admin will require a new App Catalog. It is different from the app catalog created in central admin(Make sure Self site creation is enabled in order for App Catalog to get created).

$Sub = Get-SPSiteSubscription http://hhmodeSite (This CMDlet will help in fetching the subscription ID of the HH mode site collection)

Set-SPAppSiteSubscriptionName -Name "Name for Subscription" -SiteSubscription $Sub

We need to run the above command in order to set the unique name for domain under which these apps will run.More details can be found under http://technet.microsoft.com/en-us/library/jj219503.aspx

Issue 3: OU to Site collection

How to check which Active Directory OU is assigned to which Site Collection

Solution

Normally you can see the details of each site collection using below:

Get-SPSiteSubscription –Identity http://hosted-site-URL

If you want to see details of all tenant at once, try below:

 In "Your_Tenant_Profiles_Service_ProfileDB" run below query

SELECT TOP 1000 [CanonicalMySitePortalUrl],[SynchronizationOU]
FROM [Your_Tenant_Profiles_Service_ProfileDB].[dbo].[Tenants]

Reference