Skip to content
This repository was archived by the owner on Aug 24, 2021. It is now read-only.

15 version of the Tenant.dll included#17

Merged
VesaJuvonen merged 1 commit intopnp:masterfrom
VesaJuvonen:dev
Aug 10, 2014
Merged

15 version of the Tenant.dll included#17
VesaJuvonen merged 1 commit intopnp:masterfrom
VesaJuvonen:dev

Conversation

@VesaJuvonen
Copy link
Copy Markdown
Contributor

Microsoft.Online.SharePoint.Client.Tenant.dll for on-prem (15 version)
included in the assemblies folder.

Microsoft.Online.SharePoint.Client.Tenant.dll for on-prem (15 version)
included in the assemblies folder.
VesaJuvonen added a commit that referenced this pull request Aug 10, 2014
15 version of the Tenant.dll included
@VesaJuvonen VesaJuvonen merged commit 428a37f into pnp:master Aug 10, 2014
@bhaskarvarshney
Copy link
Copy Markdown

Hi,

I create a site collection in provider hosted apps in high trust.i get this error

An exception of type 'Microsoft.SharePoint.Client.ServerException' occurred in Microsoft.SharePoint.Client.Runtime.dll but was not handled in user code

Additional information: SiteCreationProperties.Template

Parameter name: Specified value is not supported for the SiteCreationProperties.Template parameter.

I am using Microsoft.Online.SharePoint.Client.Tenant.dll for on-prem (15 version)

But still this error.

Below my code is:

string appOnlyAccessToken = TokenHelper.GetS2SAccessTokenWithWindowsIdentity(site, null);

using (ClientContext clientContext = TokenHelper.GetClientContextWithAccessToken(site.ToString(), appOnlyAccessToken))

{

var tenant = new Tenant(clientContext);

var newSite = new SiteCreationProperties()

{

Url = url,

Owner = adminAccount,

Template =

"STS#0",

Title =

"App provisioned site",

StorageMaximumLevel = 1000,

StorageWarningLevel = 500,

TimeZoneId = 7,

UserCodeMaximumLevel = 7,

UserCodeWarningLevel = 1

};

//start the SPO operation to create the site

SpoOperation op = tenant.CreateSite(newSite);

clientContext.Load(op, i => i.IsComplete);

clientContext.ExecuteQuery();

}

@VesaJuvonen
Copy link
Copy Markdown
Contributor Author

You need to ensure that you have the used template as supported template for the chosen "tenant admin site". By default code is using the root site of the web application as the admin site and if the root site is publishing site, oob team site is not available as template, which will cause this exception.

You can control the supported sites by going to the tenant admin site and add oob team site as the supported sub site template for it. This will ensure that the team site is also supported for new site collections.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants