id stringlengths 14 16 | text stringlengths 2 3.14k | source stringlengths 45 175 |
|---|---|---|
2bf3e5d126cf-0 | SharePoint sites span the default and satellite geo locations of a Multi-Geo tenant. When your custom solution needs to work with SharePoint sites, and when you deploy applications, it's important to be aware of the geo locations in your Multi-Geo tenant.
Deploy applications to Multi-Geo tenants
When you're deployi... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/multigeo-sites |
2bf3e5d126cf-1 | Perform tenant-level operations
The Tenant object is also used to configure tenant-level settings, such as CDN settings, and tenant-level site settings, such as the site geo location restriction . To perform tenant-level operations:
Find all geo locations and their associated tenant admin site URLs.
To upda... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/multigeo-sites |
e909fa713b86-0 | Accessing a user's OneDrive for Business site, also known as a personal site or my site, is a common scenario in custom applications. This article describes how to work with OneDrive for Business sites in a Multi-Geo tenant.
You can use one of several APIs to access a OneDrive for Business site:
Microsoft Graph A... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/multigeo-onedrive |
e909fa713b86-1 | GET https://graph.microsoft.com/v1.0/me/mySite
Example response for a location of user's OneDrive for Business site using Microsoft Graph
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('admin@contoso.onmicrosoft.com')/mySite",
"value": "https://contoso-my.sharepoint.com/personal/admi... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/multigeo-onedrive |
d866f4646b52-0 | When you're working with a SharePoint tenant, you'll need to be able to detect whether it's a Multi-Geo tenant and identify the default and satellite geo locations.
The following image shows a Multi-Geo tenant with:
A default geo location in North America.
A satellite geo location in Europe.
A satellite geo l... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/multigeo-discovery |
d866f4646b52-1 | Note
The following code sample uses the dataLocationCode attribute on the siteCollection object. At the time of publishing, this property is only available in Microsoft Graph beta endpoint .
GET https://graph.microsoft.com/beta/sites?filter=siteCollection/root%20ne%20null&select=webUrl,siteCollection
Exam... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/multigeo-discovery |
d866f4646b52-2 | The following example shows the results of a Microsoft Graph call to a single-geo tenant.
GET https://graph.microsoft.com/beta/sites?filter=siteCollection/root%20ne%20null&select=webUrl,siteCollection
Example response for a single-geo tenant
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#s... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/multigeo-discovery |
85f97a287e7c-0 | The permission model in a OneDrive and SharePoint Online Multi-Geo tenant is the same as that for a single geo tenant.
A Multi-Geo tenant has a single Azure Active Directory (Azure AD) environment distributed across all geo locations. This Azure AD environment includes:
All users and groups. If you grant a user o... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/multigeo-permissions |
78c66279477d-0 | OneDrive Online Multi-Geo allows multinational corporations that have one or more geographical locations, to expand their Office 365 ODSP tenancy to satisfy data residency requirements.
In a OneDrive Multi-Geo configuration, your Office 365 tenant consists of a central location (also known as a default location) and ... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/multigeo-introduction |
78c66279477d-1 | Permission model in a Multi-Geo tenant
Describes the underlying security model in a Multi-Geo tenant.
Discover a Multi-Geo tenant configuration
Explains how to detect and understand the geo setup, including the default and satellite geo locations.
Access OneDrive for Business in a Multi-Geo tenant
Des... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/multigeo-introduction |
78c66279477d-2 | Connect to external data using BCS and the Secure Store Service in a Multi-Geo tenant
Describes how to use Business Connectivity Services and the Secure Store Service in a Multi-Geo tenant.
Set up a Multi-Geo sample application
Explains how to configure Multi-Geo sample applications.
See also
Mult... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/multigeo-introduction |
44629750b774-0 | Note
You can now use sensitivity labels (/microsoft-365/compliance/sensitivity-labels-teams-groups-sites) instead of sites classification to help protect your SharePoint sites.
When you create "modern" sites in SharePoint Online, you can optionally select a site classification to define the sensitivity of your si... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-site-classification |
44629750b774-1 | Note
Consider that it takes a while (about 1 hour or more) to have the settings available in the UI of Office 365.
About the previous code snippet, it worth saying that at the time of this writing you have to use the preview version of the Azure AD cmdlets, but soon you will be able to use the RTM version. After ... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-site-classification |
44629750b774-2 | // Create a new instance of the Tenant class of CSOM
var tenant = new Tenant(adminContext);
// Get an Azure AD Access Token using ADAL, MSAL, or whatever else you like
var accessToken = getAzureADAccessToken();
// Define the list of classifications
var newClassificationList = new List<String>();
... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-site-classification |
44629750b774-3 | # Update settings
$currentSettings = Get-AzureADDirectorySetting | where { $_.DisplayName -eq "Group.Unified" }
$currentSettings["UsageGuidelinesUrl"] = "https://aka.ms/sppnp"
$currentSettings["ClassificationList"] = "HBI, MBI, LBI, GDPR"
$currentSettings["DefaultClassification"] = "MBI"
Set-AzureADDirectorySetting -Id... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-site-classification |
44629750b774-4 | // Get an Azure AD Access Token using ADAL, MSAL, or whatever else you like
var accessToken = getAzureADAccessToken();
// Retrieve the current set of values for site classification
var classificationList = tenant.GetSiteClassificationList(accessToken);
// And update it by adding a new value
va... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-site-classification |
44629750b774-5 | // Disable the site classification settings
tenant.DisableSiteClassifications(accessToken);
}
Manage the classification of a site
The value of classification for a site can be read or updated later on by using the UI of SharePoint Online, as you can see in the following figure, by editing the Site Information... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-site-classification |
44629750b774-6 | // Read the current classification value
var currentClassification = clientContext.Site.GetSiteClassification();
}
Programmatically update the classification of a site
If your target is a "modern" communication site, you can use the Classification property of CSOM to update the value, too.
If your target ... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-site-classification |
44629750b774-7 | // Read back the new classification value (it can take a while to get back the new value)
var currentClassification = clientContext.Site.GetSiteClassification();
}
See also
Customizing the "modern" experiences in SharePoint Online
Implement a SharePoint site classification solution
Manage Teams connected... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-site-classification |
1c6396f8385e-0 | In 2016, the "modern" page experience was released by the SharePoint team. Modern team site pages are fast, easy to author, and support rich multimedia content. Additionally, pages look great on any device, in a browser, or from within the SharePoint mobile app.
SharePoint pages are built with web parts, which you ca... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
1c6396f8385e-1 | Alternative layouts (see note on SharePoint Virtual Summit )
These customizations are currently not supported for "modern" pages:
Adding "classic" web parts on "modern" pages
Custom CSS via AlternateCSSUrl web property
Custom JavaScript embedded via user custom actions (see note on SharePoint Framework Ex... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
1c6396f8385e-2 | If a "classic" team site had a high count of web parts or wiki pages, the feature was not automatically enabled, and the same applies to "classic" team sites with the publishing feature enabled. If you want "modern" page functionality on these sites, you can still activate the Site Pages feature. This also implies that... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
1c6396f8385e-3 | # Connect to a site
$cred = Get-Credential
Connect-PnPOnline -Url https://[tenant].sharepoint.com/sites/siteurl -Credentials $cred | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
1c6396f8385e-4 | # Prevent site pages at web level
Disable-PnPFeature -Identity B6917CB1-93A0-4B97-A84D-7CF49975D4EC -Scope Web
# And again enable site pages at web
#Enable-PnPFeature -Identity B6917CB1-93A0-4B97-A84D-7CF49975D4EC -Scope Web
Note
When you disable the feature, the existing "modern" pages work as is. Besides, the ... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
1c6396f8385e-5 | Programming "modern" pages
Adding "modern" pages
Creating a "modern" page comes down to creating a list item in the site pages library and assigning it the correct content type combined with setting some additional properties as shown in the following code snippet:
// pagesLibrary is List object for the "site pag... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
1c6396f8385e-6 | // Make this page a "modern" page
item["ContentTypeId"] = "0x0101009D1CB255DA76424F860D91F20E6C4118";
item["Title"] = System.IO.Path.GetFileNameWithoutExtension("mypage.aspx");
item["ClientSideApplicationId"] = "b6917cb1-93a0-4b97-a84d-7cf49975d4ec";
item["PageLayoutType"] = "Article";
item["PromotedState"] = "0";
item... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
1c6396f8385e-7 | Create a new page and add a text web part
In this sample, we create a new client-side page in memory, add a rich text editor control, and finally save the page to the site pages library as mypage.aspx. The first step is creating a ClientSidePage instance, and then we instantiate a control that we add on the page by u... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
1c6396f8385e-8 | ClientSideText txt1 = new ClientSideText() { Text = "PnP Rocks" };
myPage.AddControl(txt1, 0);
myPage.Save("mypage.aspx");
Load an existing page
When you want to modify or copy an existing page, you can load that page into the PnP client-side object model; the loading "transforms" the HTML content into an object m... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
1c6396f8385e-9 | // save the page back to SharePoint
p.Save()
Add a section
Pages can have a flexible layout; you can add one or more sections on a page, and these sections can have up to three columns. You can add sections to your pages by using the SharePoint user interface, or you can do this programmatically.
var page2 = cc.... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
1c6396f8385e-10 | imageWebPart.Properties["uniqueId"] = "3C27A419-66D0-4C36-BF24-BD6147719052";
imageWebPart.Properties["imgWidth"] = 1002;
imageWebPart.Properties["imgHeight"] = 469;
page5.AddControl(imageWebPart);
page5.Save("page5.aspx");
Add a custom client-side web part
Previous samples showed how to work with out-of-the-box w... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
1c6396f8385e-11 | // get a list of possible client side web parts that can be added
var components = p.AvailableClientSideComponents();
// Find our custom "HelloWord" web part
var myWebPart = components.Where(s => s.ComponentType == 1 && s.Name == "HelloWorld").FirstOrDefault();
if (myWebPart != null)
{
// Instantiate a client side... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
1c6396f8385e-12 | // Manipulate the control order on the page...e.g. move a control to the back
myPage.Controls[1].Order = 10;
Delete a control
If you want to delete a control from a page, you can simply call the Delete method on the control and save the page back.
ClientSidePage deleteDemoPage = ClientSidePage.Load(cc, "page3.... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-pages |
3977b6c368bf-0 | In 2016, the SharePoint Online team released "modern" document lists and libraries, which bring a better user experience that is faster, more intuitive, and responsive. The "modern" experiences have many benefits, and we highly recommend using them . If your current customizations do not yet work with the "modern" exp... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-1 | Thanks to Office Online integration, you can navigate a complete document preview at the top of the information panel. The panel offers metadata, including the history of recent activity, updates to the file, and who received a share to the file.
This article focuses on the extensibility options within the "moder... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-2 | Custom master pages (more extensive branding will be supported later using alternative options)
Customization via InfoPath
Minimal Download Strategy (MDS)
SharePoint server publishing
Note
In June 2017, SharePoint Framework Extensions went into developer preview . Using these SharePoint Framework Extensi... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-3 | EditControlBlock user custom actions
Adding custom links to the context menu can be done by using the EditControlBlock as the location for your custom action. The following PnP provisioning XML creates two custom entries.
<pnp:ProvisioningTemplate ID="EditControlBlockSamples" Version="1" xmlns:pnp="http://schemas... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-4 | # Connect to a previously created Modern Site
$cred = Get-Credential
Connect-PnPOnline -Url https://[tenant].sharepoint.com/sites/siteurl -Credentials $cred | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-5 | # Apply the PnP provisioning template
Apply-PnPProvisioningTemplate -Path c:\customaction_modern_editcontrolblock.xml -Handlers CustomActions | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-6 | Note
PnP PowerShell is an open-source solution with active community providing support for it. There is no SLA for the open-source tool support from Microsoft.
If you refresh the "modern" view of a document library on your site, you'll see the new entries appear.
Custom EditControlBlock actions visible in the ... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-7 | <Button
Id="Ribbon.Documents.Copies.OfficeDevPnPDownloadAll"
Command="OfficeDevPnP.Cmd.DownloadAll"
Image16by16="/_layouts/15/images/sharepointfoundation16.png"
LabelText="Download All"
Description="Download all files separately"
... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-8 | <Scale Id="Custom Group 2.Scaling.Scale" GroupId="Custom Group 2" Size="OneLarge" />
</Scaling>
<Groups Id="Custom Tab.Groups">
<Group Id="Custom Group 2" Title="Custom Group 2" Description="Custom Group 2" Sequence="7888" Template="Ribbon.Templates.OneLarge">
... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-9 | </Controls>
</Group>
</Groups>
</Tab>
</CommandUIDefinition>
<CommandUIDefinition Location="Ribbon.Templates._children">
<GroupTemplate Id="Ribbon.Templates.TwoLarge">
<Layout Title="TwoLarge" LayoutTitle... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-10 | </pnp:CommandUIExtension>
</pnp:CustomAction>
</pnp:SiteCustomActions>
</pnp:CustomActions>
</pnp:ProvisioningTemplate>
After adding these user custom actions, you'll see them appear on the toolbar. Notice that custom tabs are transformed into a drop-down menu.
Custom action visible on the toolbar
... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-11 | You can't completely control the order in which the user custom actions show up; the user custom actions are added in the order the _api/web/Lists(guid'listid')/CustomActionElements returns the user custom actions, and this API currently does not take into account the sequence attributes. Buttons defined inside a cus... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-12 | Configure the end user experience
You have multiple options to control whether the "modern" or "classic" library and list experience is used. Check out the Opting out of the modern list and library experience article for more details.
When does the built-in auto-detect automatically switch rendering back to "clas... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-13 | The JSLink property is set on one of the fields to render.
One of the fields to render is of type BCS external data , Geolocation , OutcomeChoice , or one of these publishing field types Image , Html , or SummaryLinks .
There are list scoped user custom actions that have their ScriptSrc property set.
If... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-14 | cc.Load(file, f => f.PageRenderType);
cc.ExecuteQuery(); | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-15 | // Check page render type
Console.WriteLine($"Status = {file.PageRenderType}");
}
Note
The PageRenderType property was introduced in January 2017 CSOM release (16.1.6112.1200) .
REST request
GET _api/web/getfilebyserverrelativeurl('/sites/dev/ECMTest/Forms/AllItems.aspx')/pageRenderType
The RES... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3977b6c368bf-16 | WebSettingOff
17
TenantSettingOff
18
CustomizedForm
19
DocLibNewForm
20
UnsupportedFieldTypeInForm
21
InvalidFieldTypeInForm
22
InvalidControModeInForm
23
CustomizedPage
24
ListTemplateNotSupported
100
Modern
Additional considerations
We'... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-lists-and-libraries |
3cebdfc8de32-0 | In 2016, the SharePoint Online team released "modern" collaboration sites. These "modern" team sites are integrated with Microsoft 365 groups and bring a greatly improved end user experience. "Modern" team sites are responsive by design and are much faster to create and use from an end user perspective. Following are s... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-sites |
3cebdfc8de32-1 | Apply an out-of-the-box theme.
Create custom site columns (fields) and content types.
Create lists and libraries.
Configure site settings, such as regional settings, languages, and auditing settings.
Note
By default, a "modern" team site has scripting capabilities turned off. You can still apply a custom ... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-sites |
3cebdfc8de32-2 | Activation of community feature or creation of community subsites under "modern" team site.
Saving site as a template. Also not supported for sub sites in site collections which root site is a group associated team site or communication site.
Programmatically updating navigation elements.
Because "modern" team ... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-sites |
3cebdfc8de32-3 | The following elements are ignored when a remote template is applied to a "modern" team site or a site that has NoScript enabled:
Site collection AuditLogTrimmingRetention configuration in the auditing settings
Applying a custom theme from the template; current implementation has a dependency on storing a custo... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-sites |
3cebdfc8de32-4 | # Apply a custom theme to a Modern Site
# First, upload the theme assets
Add-PnPFile -Path .\sppnp.spcolor -Folder SiteAssets
Add-PnPFile -Path .\sppnp-bg.png -Folder SiteAssets
# Second, apply the theme assets to the site
Set-PnPTheme -ColorPaletteUrl "SiteAssets/sppnp.spcolor" -BackgroundImageUrl "SiteAssets/sppnp-... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-sites |
3cebdfc8de32-5 | Modern" team site with custom theme
Note
You can change the logo of "modern" team site by using the Groups Graph API as shown by the SharePoint PnP UpdateUnifiedGroup method .
Applying a custom theme to a "modern" team site can cause timeouts. The resolution for this is to turn off all available user inte... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-sites |
3cebdfc8de32-6 | // It's a site without noscript enabled
return false;
}
Additional considerations
We'll gradually introduce more customization options for "modern" team sites that will be aligned with the release of additional SharePoint Framework capabilities. Currently there is no exact schedule available, but we'll update ... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-customize-sites |
67f12c607cd9-0 | "Modern" sites were introduced in SharePoint Online during the autumn of 2016, and the option to use them can be controlled at the tenant level. This article discusses the different options and considerations for provisioning "modern" sites in SharePoint Online. In particular, the article covers how to create both "mod... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-1 | Thus, if you have to create a site for team collaboration, most likely the "modern" team site is the right choice. On the contrary, if you want to communicate something to a broad set of people, probably the communication site is your best choice.
Provisioning "modern" team sites
In this section you learn how to pr... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-2 | Provision a "modern" team site programmatically via SharePoint Online REST API
"Modern" team sites can be created programmatically by using a REST API provided by SharePoint Online, and also used by the Create Site UI of SharePoint Online. To provision a "modern" team site via REST, make a POST request to the Microso... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-3 | {
"description": "description",
"displayName": "My modern team site",
"groupTypes": [
"Unified"
],
"mailEnabled": true,
"mailNickname": "mymodernteamsite",
"securityEnabled": false
}
Provision a "modern" team site by using the PnP CSOM Core component
In the SharePoint PnP Core component—since the... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-4 | // Create new "modern" team site at the url
// https://[tenant].sharepoint.com/sites/mymodernteamsite
var teamContext = await context.CreateSiteAsync(
new TeamSiteCollectionCreationInformation
{
Alias = "mymodernteamsite", // Mandatory
DisplayName = "displayName", // Mand... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-5 | # Connect to the modern site using PnP PowerShell SP cmdlets
# Since we are connecting now to SP side, credentials will be asked
Connect-PnPOnline $teamSiteUrl
# Now we have access on the SharePoint site for any operations
$web = Get-PnPWeb -Includes WebTemplate, Configuration
$web.WebTemplate + "#" + $web.Configurati... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-6 | # Since the CLI for Microsoft 365 is connected to Microsoft 365 tenant we can do any operations.
# As example, we can list all the properties from the site property bag:
m365 spo propertybag list -u $siteUrl
Provision a Microsoft 365 group programmatically
"Modern" team sites can be created programmatically by cr... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-7 | // We received a group entity containing information about the group
string url = group.SiteUrl;
string groupId = group.GroupId; | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-8 | // Get group based on groupID
var group2 = UnifiedGroupsUtility.GetUnifiedGroup(groupId, accessToken);
// Get SharePoint site URL from group id
var siteUrl = UnifiedGroupsUtility.GetUnifiedGroupSiteUrl(groupId, accessToken);
// Get all groups in the tenant
List<UnifiedGroupEntity> groups = UnifiedG... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-9 | # Create a new modern team site
New-PnPSite -Type Team -Title "Awesome Group" -Description "Awesome Group" -Alias "awesome-group"
Provision a modern team site using SharePoint Online Management Shell or PnP PowerShell
It is also possible to create a modern site which is not connected to a Group using PowerShell. E... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-10 | # Create a Microsoft 365 group
# The newly created SharePoint site for that group will have the URL
# https://[tenant].sharepoint.com/sites/awesome-group
m365 aad o365group add --displayName 'Awesome Group' --description 'Awesome Group' --mailNickname awesome-group
Provisioning "modern" communication sites
In this... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-11 | var targetTenantUrl = "https://[tenant].sharepoint.com/";
using (var context = new ClientContext(targetTenantUrl))
{
context.Credentials = OfficeDevPnP.Core.Utilities.CredentialManager.GetSharePointOnlineCredential("[Name-of-Your-Credentials]");
// Create new "modern" communication site at the url https://[te... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-12 | # Create the new "modern" communication site
$communicationSiteUrl = New-PnPSite -Type CommunicationSite -Title "displayName" -Url "https://[tenant].sharepoint.com/sites/mymoderncommunicationsite" -Description "description" -Classification "classification" -SiteDesign Topic
# Connect to the modern site using PnP Power... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-13 | # Since the CLI for Microsoft 365 is connected to your Microsoft 365 tenant we can do any operations.
# As example, we can list all the properties from the site property bag:
m365 spo propertybag list -u $siteUrl
Additional considerations
Subsites use "classic" templates
If you provision a subsite under the roo... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
67f12c607cd9-14 | See also
What is a SharePoint team site?
Create a team site in SharePoint Online
Manage site creation in SharePoint Online
Manage your SharePoint team site settings
Customizing the "modern" experiences in SharePoint Online | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-provisioning-sites |
83ad5f6e82c4-0 | SharePoint Online has started the gradual introduction of "modern" experiences across the SharePoint service, which has a direct impact not only on the end user experience but also on the customization options that can be used. This article provides an overview of the "modern" experiences to get you started, including ... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations |
83ad5f6e82c4-1 | Assess : Assess to what extent your current customizations can work within the "modern" experience. Also assess which of your sites have customizations or features that will not work within the "modern" experiences. These sites and their customizations should be updated or need to stay in "classic". However, other site... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations |
83ad5f6e82c4-2 | Customizing "modern" site pages
"Modern" team site pages are fast, easy to author, and support rich multimedia content. Additionally, these pages look great on any device, in a browser, or from within the SharePoint mobile app. This article focuses on the extensibility options available within the "modern" page exper... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations |
83ad5f6e82c4-3 | Caution
It is not supported to delete or replace existing site collection from the root URL of your tenant. You should not in any circumstances delete the root site collection. Technically this can be performed using APIs, but that can cause the tenant to move into inconsistent status.
Enable home layout in colla... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations |
83ad5f6e82c4-4 | # List all pages, and find the id of the modern page which you want to change
Get-PnPListItem -List SitePages
# Change layout from "Article" to "Home" to remove top banner
Set-PnPListItem -List SitePages –Identity <id> -Values @{"PageLayoutType"="Home"}
Note
PnP PowerShell is an open-source solution with activ... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations |
cd633ddc1a7f-0 | You can improve the performance of your SharePoint provider-hosted add-in by limiting the number and frequency of remote calls to SharePoint. Too many calls to the host site degrades performance. To limit the number of remote calls, you can implement either HTTP cookies or HTML5 local storage.
The Performance.Cachin... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/improve-performance-in-sharepoint-provider-hosted-add-ins |
cd633ddc1a7f-1 | if (expiry == "") { expiry = "1"; }
// The following line sets for n number of days. For hours, remove * 24. For minutes, remove * 60 * 24.
if (expiry) {
expiry = expiry * 1000 * 60 * 60 * 24;
}
var newExpiry = new Date(todaysDate.getTime() + (expiry));
document.cookie = key + "=" + escap... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/improve-performance-in-sharepoint-provider-hosted-add-ins |
cd633ddc1a7f-2 | If local storage is supported, the function determines whether the user profile information is already stored there. If it isn't, it uses JSOM to look up the About Me information, to store it locally, and then to display the information in the browser. The following code stores the About Me information in a key nam... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/improve-performance-in-sharepoint-provider-hosted-add-ins |
cd633ddc1a7f-3 | // Override cached setting if a user has entered a value that is different than what is stored.
if (expiryConfig != null) {
var currentTime = Math.floor((new Date().getTime()) / 1000);
expiryConfig = parseInt(expiryConfig);
var newStamp = Math.floor((currentTime + e... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/improve-performance-in-sharepoint-provider-hosted-add-ins |
c3aef411ac79-0 | Create UX controls in SharePoint provider-hosted add-ins that work and behave like UX controls on the host web.
The article describes three samples that show you how to implement UX controls in your provider-hosted add-in:
Core.PeoplePicker – Shows you how to add a people picker control.
Core.TaxonomyMenu –... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins |
c3aef411ac79-1 | The Scripts folder of the Core.PeoplePickerWeb project contains app.js and peoplepickercontrol.js files (along with people picker resource files for additional language support). The app.js file fetches client context by using the cross-domain library and hooks the HTML in the Default.aspx file into the people picker c... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins |
c3aef411ac79-2 | The app.js file then creates and configures a people picker control.
//Make a people picker control.
//1. context = SharePoint Client Context object
//2. $('#spanAdministrators') = SPAN that will 'host' the people picker control
//3. $('#inputAdministrators') = INPUT that will be used to capture user input
//4. $('#d... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins |
c3aef411ac79-3 | var query = new SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters();
query.set_allowMultipleEntities(false);
query.set_maximumEntitySuggestions(2000);
query.set_principalType(parent.GetPrincipalType());
... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins |
c3aef411ac79-4 | Taxonomy menu control
The Core.TaxonomyMenu sample shows you how to implement a localizable taxonomy menu control that is populated from the term store in a provider-hosted add-in. The add-in also sets up the required term store languages, groups, sets, and terms for populating the menu, and checks the user's langu... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins |
c3aef411ac79-5 | // Create the term group.
termGroup = termStore.CreateGroup("Taxonomy Navigation", groupId);
clientContext.Load(termGroup);
clientContext.ExecuteQuery();
Finally, the following code in the same TaxonomyHelper class creates each new term, along with labels for the German, French, a... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins |
c3aef411ac79-6 | The add-in then determines whether the user's language preference matches one of the enabled languages. If it finds a match, the following code gets the terms and the associated labels for the user's preferred language.
while (termEnumerator.moveNext()) {
var currentTerm = termEnumerator.get_current();
var la... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins |
c3aef411ac79-7 | termItems.push(currentTerm);
termLabels.push(label);
context.load(currentTerm);
Finally, the following code in the topnav.js file inserts links that contain the terms into the top navigational element of the host site.
html += "<ul style='margin-top: 0px; margin-bottom: 0px;'>"
for (var i in term... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins |
c3aef411ac79-8 | $('#DeltaTopNavigation').html(html);
SP.UI.Notify.removeNotification(nid);
Taxonomy picker control
The Core.TaxonomyPicker sample shows you how to implement a taxonomy picker control in a provider-hosted add-in. When the user starts typing a term into the text input box, the control searches the term... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins |
c3aef411ac79-9 | <div class="ms-core-form-line" style="margin-bottom: 0px;">
<asp:HiddenField runat="server" id="taxPickerKeywords" />
</div>
</td>
</tr>
</table> | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins |
c3aef411ac79-10 | <asp:Button runat="server" OnClick="SubmitButton_Click" Text="Submit" />
<asp:BulletedList runat="server" ID="SelectedValues" DataTextField="Label" />
</div>
The app.js file then creates and configures a taxonomy picker control.
// Load scripts for calling taxonomy APIs.
$.getScr... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins |
c3aef411ac79-11 | // Get all terms for the term set and organize them in the async callback.
this.RawTerms = this.RawTermSet.getAllTerms();
spContext.load(this.RawTermSet);
spContext.load(this.RawTerms);
spContext.executeQueryAsync(Function.createDelegate(this, this.termsLoadedSuccess), Fu... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins |
57918492400f-0 | This article describes samples that show best practices for customizing SharePoint UX components, including the following scenarios:
Page manipulation (adding and modifying a wiki page)
Showing add-ins and data in modal dialog boxes
Creating personalized UI elements
Client-side rendering (deploying JSLi... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/customize-the-ux-by-using-sharepoint-provider-hosted-add-ins |
57918492400f-1 | In both scenarios, the sample adds the HTML entered via the text box on the start page by using the AddHtmlToWikiPage method in a helper class named LabHelper . This method inserts the HTML from the form inside the WikiField field of the wiki page.
public void AddHtmlToWikiPage(ClientContext ctx, Web web, string... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/customize-the-ux-by-using-sharepoint-provider-hosted-add-ins |
57918492400f-2 | Microsoft.SharePoint.Client.File wikiPage = null;
foreach (Microsoft.SharePoint.Client.File aspxFile in pagesLib.Files)
{
if (aspxFile.Name.Equals(page, StringComparison.InvariantCultureIgnoreCase))
{
wikiPage = aspxFile;
b... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/customize-the-ux-by-using-sharepoint-provider-hosted-add-ins |
57918492400f-3 | this.hplPage2.NavigateUrl = string.Format("{0}/{1}", Request.QueryString["SPHostUrl"], scenario2PageUrl);
The helper code displays the promoted links with a table inside an XsltListViewWebPart web part.
Second wiki page with XsltListViewWebPart and promoted links table
The WpPromotedLinks object on the... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/customize-the-ux-by-using-sharepoint-provider-hosted-add-ins |
57918492400f-4 | if (addSpace)
{
layoutsZoneInner.AppendChild(space);
}
XmlAttribute attribute = xd.CreateAttribute("class");
wpBoxDiv.Attributes.Append(attribute);
attribute.Value = "ms-rtestate-read ms-rte-wpbox";
attribute = xd.CreateAttribute("... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/customize-the-ux-by-using-sharepoint-provider-hosted-add-ins |
57918492400f-5 | ListItem listItem = webPartPage.ListItemAllFields;
listItem["WikiField"] = xd.OuterXml;
listItem.Update();
ctx.ExecuteQuery();
Showing add-ins and data in modal dialog boxes
The Core.Dialog sample shows two methods for embedding modal dialog box links. These links display ... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/customize-the-ux-by-using-sharepoint-provider-hosted-add-ins |
57918492400f-6 | }
You could, for example, choose to display certain UI elements (such as buttons) or even different page layouts, depending on whether or not the content is being displayed in a dialog box.
The start page UI presents two options for creating links to the dialog box, along with a list of all the lists on the host w... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/customize-the-ux-by-using-sharepoint-provider-hosted-add-ins |
57918492400f-7 | // Create a custom action.
CustomActionEntity customAction = new CustomActionEntity()
{
Title = "Office AMS Dialog sample",
Description = "Shows how to start an add-in inside a dialog box.",
Location = "Microsoft.SharePoint.StandardMenu",
Group = "SiteActions",
Sequence = 10000,
Url = modelDialogScript.ToSt... | https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/customize-the-ux-by-using-sharepoint-provider-hosted-add-ins |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.