Vue normale

Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.
À partir d’avant-hierFlux principal

Create a SharePoint online site using Power Automate flow

In this article, I will demonstrate how to provision a SharePoint online modern site using a Power automate flow. As there is no standard Power automate action for creating a SharePoint site (previously called “site collections”) using SharePoint connector, we will use the Send an HTTP Request to SharePoint action and SharePoint REST API in Power automate flow.

Follow below steps to create a SharePoint online modern communication site using Power Automate flow:

1. Go to make.powerautomate.com and create a new Instant cloud flow with Manually trigger a flow trigger.

2. Add Send an HTTP request to SharePoint action in Power automate flow.

3. Use configurations for Send an HTTP request to SharePoint action in below format:

MethodPOST

Uri_api/SPSiteManager/create

Headers:

{
	"accept": "application/json;odata=verbose",
	"content-type": "application/json;odata=verbose"
}

Body:

{
	"request": {
		"Title": "My Communication Site",
		"Url": "https://contoso.sharepoint.com/sites/MyCommSite",
		"Description": "My Communication Site created using Power Automate flow",
		"Owner": "gsanap@contoso.com",
		"Lcid": 1033,
		"WebTemplate": "SITEPAGEPUBLISHING#0",
		"SiteDesignId": "6142d2a0-63a5-4ba0-aede-d9fefca2c767",
		"ShareByEmailEnabled": false
	}
}

Where,

Url

URL for the new SharePoint online modern site (site collection)

LCID

Locale identifier (LCID) for the site language. 1033 is for English language, check LCID for other languages at: Language.Lcid property

WebTemplate

WebTemplate property is used to specify which type of SharePoint site to you want to create. You can use following values for this property:

  • Communication Site: SITEPAGEPUBLISHING#0
  • Team Site (not connected to M365 group): STS#3

SiteDesignId

SiteDesignId property is used to apply site template (previously called “site design”) to newly created SharePoint site.

If you want to apply an out-of-the-box available site template, use the following values:

  • Topic: 96c933ac-3698-44c7-9f4a-5fd17d71af9e
  • Showcase: 6142d2a0-63a5-4ba0-aede-d9fefca2c767
  • Blank: f6cc5403-0d63-442e-96c0-285923709ffc

ShareByEmailEnabled

If this property is set to true, it will enable sharing SharePoint files via Email.

Your final Power automate flow should look like this:

Create a SharePoint online modern communication site using Power Automate flow and SharePoint REST API
Create a SharePoint online site using Power Automate flow

4. Save your flow and Run it using Test > Manually options at the top right corner. After flow run completes successfully, navigate to the site URL mentioned in Send an HTTP request to SharePoint action in Power automate flow and you will see a newly created SharePoint online modern communication site like:

SharePoint online modern communication site created using Power Automate flow and SharePoint REST API with Send an HTTP request to SharePoint action
SharePoint online modern communication site created using Power Automate

Learn more

Manage Microsoft Teams and channel connected team sites in SharePoint admin center

With growing adoption of Microsoft Teams and Channels, Microsoft heard the feedback to simplify the management of Teams and Channel connected sites. Microsoft is enhancing the Active sites page experience in SharePoint admin center to include channel sites that are provisioned when a special channel is added to a Team in Microsoft Teams.

So now, when you go to a teams-connected site in SharePoint online admin center, you see all corresponding channel sites and can ensure that right optional security policies are inherited from the parent site.

Enhancements included in this release:

  • New Site connected to Teams view that filters the sites list to only sites that are Teams connected.
  • New Teams column identifying the site is connected to teams.
  • New Channel Sites column identifying the team connected site has associated Private or Shared channel sites.
  • Additional entry points to channel sites from Teams connected site info panel.
  • All new Active sites pivot showing the channel sites associated to the teams connected site.
  • The pivot includes a list of channel sites that are associated to the Teams connected site. This list will only include Private sites as of now and will expend to include other special sites in the future. Channel are view only and inherit properties from Teams that are managed in Teams admin center.
  • New Type column that accessible from the new Active Sites pivot.
  • Ability to manage Channel site storage limit.

This message is associated with Microsoft 365 Roadmap ID 82161.

Release Timeline

Rollout will begin in early December 2021 and it is expected to complete the rollout by late January 2022.

How this will affect your organization

Historically, channel sites have been only accessible to admins through PowerShell and through the Microsoft Teams client app. With these enhancements admins can now access channel sites through SharePoint online admin center UX as well.

Manage Microsoft Teams and channel connected team sites in SharePoint online admin center
Manage Microsoft Teams and channel connected team sites in SharePoint admin center

What you need to do to prepare

No special preparation is required. Once the enhancements are available in your tenant you will be able to start using them immediately, without any impact to your day-to-day experience.

Learn more

Enable or Disable the Social Bar (Like, Views, Save for later) for individual SharePoint sites

In my previous blog, we saw how to enable or disable the Social Bar (Like, Views, Save for later) in SharePoint Online at tenant level using SharePoint Online PowerShell, PnP PowerShell and CLI for Microsoft 365. In this blog we will explore how to enable or disable the Social Bar for individual SharePoint online site collections.

You can use any one of the approaches given below for enabling or disabling the Social Bar (Like, No. of Comments, Views, Save for later) for individual SharePoint online sites.

Using SharePoint Online PowerShell

Use below SharePoint Online PowerShell script to enable or disable the social bar from site pages for specific SharePoint online modern experience site:

# SharePoint online admin center URL
$adminCenterUrl = Read-Host -Prompt "Enter your SharePoint online admin center URL (e.g https://contoso-admin.sharepoint.com/)"

# Connect to SharePoint online admin center
Connect-SPOService -Url $adminCenterUrl

# SharePoint online site URL
$siteUrl = Read-Host -Prompt "Enter your SharePoint site URL (e.g https://contoso.sharepoint.com/sites/work)"

# Disable the social bar from SharePoint online site pages
Set-SPOSite -Identity $siteUrl -SocialBarOnSitePagesDisabled $true

# Enable the social bar on SharePoint online site pages
Set-SPOSite -Identity $siteUrl -SocialBarOnSitePagesDisabled $false

# Disconnect SharePoint online connection
Disconnect-SPOService

Using PnP PowerShell

You can use below PnP PowerShell script to show or hide the social bar from SharePoint online modern experience site pages for individual SharePoint site:

# SharePoint online site URL
$siteUrl = Read-Host -Prompt "Enter your SharePoint site URL (e.g https://contoso.sharepoint.com/sites/work)"

# Connect to SharePoint online site
Connect-PnPOnline -Url $siteUrl -Interactive

# Hide the social bar from SharePoint online modern site pages
Set-PnPSite -SocialBarOnSitePagesDisabled $true

# Show the social bar on SharePoint online modern site pages
Set-PnPSite -SocialBarOnSitePagesDisabled $false

# Disconnect SharePoint online connection
Disconnect-PnPOnline

Using CLI for Microsoft 365

Use below CLI for Microsoft script to show or hide the social bar from SharePoint online modern experience site pages for individual SharePoint site:

# SharePoint online site URL
$siteUrl = Read-Host -Prompt "Enter your SharePoint site URL (e.g https://contoso.sharepoint.com/sites/work)"

# Connect to SharePoint online tenant
$m365Status = m365 status
if ($m365Status -match "Logged Out") {
    m365 login
}

# Hide the social bar from SharePoint online modern site pages
m365 spo site set --url $siteUrl --socialBarOnSitePagesDisabled true

# Show the social bar on SharePoint online modern site pages
m365 spo site set --url $siteUrl --socialBarOnSitePagesDisabled false

# Disconnect SharePoint online connection
m365 logout

Conclusion

By using the PowerShell scripts given in this blog post, you can enable or disable social bar features from SharePoint online modern site pages for specific SharePoint online sites.

Learn more

❌
❌