Vue normale

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

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

Enable or Disable the Social Bar (Like, Views, Save for later) in SharePoint at tenant level

SharePoint Online provides various social features in modern experience SharePoint sites. One of the features available for SharePoint site pages is the social bar (Like, No. of Comments, Views, Save for later), which is situated at the bottom of site pages. Social bar allows users to engage with page content by liking and saving pages for later reference. Social bar also shows the number of page views and comments on modern site pages.

However, organizations may have specific requirements that necessitate enabling or disabling the social bar on SharePoint site pages. Unfortunately, there are no settings available for enabling/disabling social bar using SharePoint user interface. In this blog post, we will explore how to achieve this at SharePoint tenant level using SharePoint Online PowerShell, PnP PowerShell and CLI for Microsoft 365 scripts.

Using SharePoint Online PowerShell

Use below SharePoint Online PowerShell script to enable or disable the social bar from site pages for all SharePoint sites in the tenant:

# SharePoint online admin center URL
$adminCenterUrl = "https://contoso-admin.sharepoint.com/"

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

# Disable the social bar from SharePoint online site pages
Set-SPOTenant -SocialBarOnSitePagesDisabled $true

# Enable the social bar on SharePoint online site pages
Set-SPOTenant -SocialBarOnSitePagesDisabled $false

Using PnP PowerShell

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

# SharePoint online admin center URL
$adminCenterUrl = "https://contoso-admin.sharepoint.com/"

# Connect to SharePoint online admin center
Connect-PnPOnline -Url $adminCenterUrl -Interactive

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

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

Using CLI for Microsoft 365

Use below CLI for Microsoft 365 script to enable or disable the Social Bar (like, No. of comments, views, Save for later) in SharePoint online at tenant level:

# Get Credentials to connect
$m365Status = m365 status
if ($m365Status -match "Logged Out") {
    m365 login
}

# Disable the social bar from SharePoint online site pages
m365 spo tenant settings set --SocialBarOnSitePagesDisabled true

# Enable the social bar on SharePoint online site pages
m365 spo tenant settings set --SocialBarOnSitePagesDisabled false

Conclusion

Enabling or disabling the social bar on site pages in SharePoint Online can be achieved using SharePoint Online PowerShell, PnP PowerShell or CLI for Microsoft 365 scripts. By following the steps outlined in this blog post, you can customize the user experience and align it with your organization’s specific requirements. Whether you want to encourage user engagement or disable social features for certain scenarios, these PowerShell scripts provide the flexibility to control the social bar’s presence on SharePoint online modern site pages.

Learn more

How to Enable/Disable the commenting in SharePoint Online/Microsoft Lists

In my previous blog about Commenting in SharePoint Online and Microsoft lists, I explained where you can find the comments options, what are the permission considerations, working with commenting using SharePoint REST APIs and JSON formatting, etc. In this blog I will explain how you can enable/disable the commenting in SharePoint Online/Microsoft Lists.

Commenting in lists is a great feature which will help many organizations. However, it’s possible that some organizations may want to disable this feature as they already have some mechanism in place for commenting, for example approvals system as mentioned here.

Currently it is not possible to disable commenting at the SharePoint site or list level (possible as of June 2021). Microsoft is working on the new feature which will allow users to enable/disable the comments for individual SharePoint lists.

However, Admins can enable/disable this feature at the organization level by changing the CommentsOnListItemsDisabled parameter in the Set-SPOTenant PowerShell cmdlet:

# To disable comments on list items
Connect-SPOService -Url https://<tenant>-admin.sharepoint.com/ 
Set-SPOTenant -CommentsOnListItemsDisabled $true

# To enable comments on list items
Connect-SPOService -Url https://<tenant>-admin.sharepoint.com/ 
Set-SPOTenant -CommentsOnListItemsDisabled $false

Replace <tenant> with the name of your Microsoft 365 tenant.

Using PnP PowerShell

You can also use PnP PowerShell to enable or disable commenting in SharePoint Online/Microsoft Lists at tenant level:

# Connect to SharePoint online admin center
Connect-PnPOnline -Url https://<tenant>-admin.sharepoint.com/ -Interactive

# To disable comments on list items
Set-PnPTenant -CommentsOnListItemsDisabled $true

# To enable comments on list items
Set-PnPTenant -CommentsOnListItemsDisabled $false

Using CLI for Microsoft 365

Use below CLI for Microsoft 365 script to enable or disable commenting in SharePoint Online/Microsoft Lists at tenant level:

# Get Credentials to connect
$m365Status = m365 status
if ($m365Status -match "Logged Out") {
    m365 login
}

# To disable comments on list items
m365 spo tenant settings set --CommentsOnListItemsDisabled true

# To enable comments on list items
m365 spo tenant settings set --CommentsOnListItemsDisabled false

Note: You must be a SharePoint Administrator or Global Administrator in your tenant to enable/disable this feature using PowerShell.

I hope you liked this blog. Give your valuable feedback & suggestions in the comments section below and share this blog with others.

See also

Bougeoir Brico Dépôt VS Lampe DIYBOIS

BricoDepot-DIYBOIS

Il y a quelques temps j’ai été contacté sur Facebook par une agence de communication, qui m’a demandé si je pouvais participer à

Cet article Bougeoir Brico Dépôt VS Lampe DIYBOIS est apparu en premier sur DIYBOIS.

S-Electricity : connecter son compteur d’électricité en Wifi dans Constellation – le remake d’S-Energy avec un ESP8266

Présentée en Février 2015 lors des Microsoft Techdays, S-Energy est une solution de monitoring des ressources énergétiques (eau, électricité et gaz) connectée dans Constellation conçue fin 2014 suite à une fuite d’eau sur ma chaudière. Avec Constellation, la plateforme d’interconnexion des objets connectés, applications et services, cela me permet d’afficher les consommations en temps sur […]

Cet article S-Electricity : connecter son compteur d’électricité en Wifi dans Constellation – le remake d’S-Energy avec un ESP8266 est apparu en premier sur Sebastien.warin.fr.

Sending Auto-Replies from Shared Mailboxes

Configure Shared Mailbox Auto Reply for External Contacts

Contact handling is an important part of website communication. Most sites have a contact form that people can fill in to ask questions, perhaps after passing a CAPTCHA test. Behind the scenes, the information from the form might end up in an email to allow the site owners to deal with the query, which is how things should work normally.

Much to the embarrassment of the Office 365 for IT Pros team, we discovered that the contact form for our website has not worked for quite a time. We’ve fixed the problem now to make sure that if anyone uses the contact form to ask a question about the book or comment on book text, the site emails the query to a shared mailbox. If anyone’s interested, we upgraded the site to use the WPForms Lite plug-in for WordPress.

Suitably chastened, we have reached out to people who entered queries through the contact form to follow up and make sure that their questions are answered.

Shared Mailboxes versus Microsoft 365 Groups

Now that everything is fixed on our web site, contact messages sent to Office 365 for IT Pros flow into a shared mailbox. We could use the Microsoft 365 group to process book comments, but it’s cleaner to separate the two. And anyway, we want to use an auto-reply message to acknowledge the receipt of queries, and that feature isn’t supported yet by Microsoft 365 groups (see this comparison between shared mailboxes and Microsoft 365 groups). Some people don’t know that shared mailboxes support auto-reply, but they do and it’s a very useful option at times. For instance, when national holidays roll around, you can use PowerShell to quickly configure shared mailboxes used for customer communication with an appropriate auto-reply message saying that responses will be delayed.

We do use a Microsoft 365 group to organize the production of the book because we keep our chapter and other files in a SharePoint Online site and use Teams to discuss different aspects of the book, like what we’re working on in a monthly update or who hasn’t filed their chapter updates for a monthly update. So many options exist within Microsoft 365 to achieve goals in different ways that it’s often hard to decide which is best. In our case, being able to send auto-replies for contact messages tipped the balance.

Configuring the Distribution List

The email address used for comments configured on our website directs messages to a distribution list. The membership of the distribution list includes the shared mailbox and some other user mailboxes that might be involved in answering queries.

Because the first address reached by inbound messages is a distribution list, we need to configure the list to allow the generation of auto-reply messages and to allow external people to send messages to the list:

Set-DistributionGroup -Identity O365.Book.Comments -RequireSenderAuthenticationEnabled $False -SendOofMessageToOriginatorEnabled $True

To configure the shared mailbox auto reply, we use the Set-MailboxAutoReplyConfiguration cmdlet:

$AutoReplyText = "<h1>Thanks For Your Message</h1><p>We've received your email to <b>Office 365 for IT Pros</b>. If we need to respond to you, we'll be in touch by email within 48 hours. If you need help faster, reply to this email and we'll accelerate our response.</p><p>Best Regards</p><p><i>The Office 365 for IT Pros team</i></p>"
Set-MailboxAutoReplyConfiguration -Identity book.comments@office365itpros.com -AutoReplyState "Enabled" -InternalMessage $AutoReplyText –ExternalMessage $AutoReplyText -ExternalAudience 'All' 

Figure 1 shows the auto-reply we generate:

Auto-reply message from the Office 365 for IT Pros shared mailbox for contact queries

Shared mailbox auto reply
Figure 1: Shared mailbox auto reply message generated for Office 365 for IT Pros contact queries

The technique of allowing Exchange Online to generate and deliver auto-reply messages for messages received by mailboxes through their membership of a distribution list is uncommon but it is used in practice (which is why the SendOofMessageToOriginatorEnabled parameter exists). For instance, this recent example of a use case is in the Microsoft Technical Community.

Another thing to check is to ensure that the shared mailbox doesn’t have a forwarding SMTP address set (this article is worth checking out when debugging OOF issues). Exchange Online won’t send auto-replies for a mailbox when a forwarding address is set.

Forwarding from a Shared Mailbox

We could have reversed the process and configured the shared mailbox to forward messages to another address. Any valid internal SMTP address works including one for a distribution list, but the outbound spam filter probably blocks forwarding to external addresses. If the organization blocks forwarding to external addresses, senders receive a non-delivery notification (5.7.520 Access Denied). In general, mail forwarding from mailboxes is a practice to avoid, so it’s one that we decided not to investigate too much.

Normal Service Resumed

Running a website throws up challenges on an ongoing basis. We should have caught the problem with our contact form earlier and sincerely regret if this caused anyone any extra hassle. On the upside, it did give us a chance to review the handling of contact queries from the website through to Exchange Online to make sure that everything now works as it should.


Learn about using Exchange Online and the rest of Office 365 by subscribing to the Office 365 for IT Pros eBook. Use our experience to understand what’s important and how best to protect your tenant.

Tip For Testing Your Flows In Power Automate

Wouldn't it be nice if we can Test our Flows without executing some of the actions like Sending Emails, creating items in SharePoint or Dataverse? Guess what we can! And its very easy to do. Check this out!

BlogPic

jcook127001

❌
❌