0
votes

I'm trying to make users follow a certain Sharepoint Online site by using Powershell but I don't know where the follow property is stored.

I can fetch users and sites using both Connect-PnPOnline and Connect-SPOService. Now how do I use this to make certain users follow a certain site?

Thanks!

2

2 Answers

0
votes

This is unfortunately not possible in SharePoint online because the APIs(CSOM,REST,JSOM,PowerShell) needed to make it work are not exposed/available. This is possible in SharePoint On-Premise though(using SSOM), but that's not useful for your issue.

So, only using the user's account can you follow a site in SharePoint online.

Reference (check table - API for common tasks for following content in SharePoint) - Follow content in SharePoint

0
votes

A semi automatic version is availible here: https://gist.github.com/magnusdanielson/9ed8d8db2e041552eb6f3f32bafd0e30

It requires the user to navigate once to the site. You could argue that the user should be able to click the "follow" button, but even that is to much for some :)