Follow a site programmatically on behalf of another user

%3CLINGO-SUB%20id%3D%22lingo-sub-70444%22%20slang%3D%22en-US%22%3EFollow%20a%20site%20programmatically%20on%20behalf%20of%20another%20user%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-70444%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20site%20in%20SharePoint%20Online%20that%20I%20would%20like%26nbsp%3Ball%20users%20in%20my%20organization%20to%20follow.%20%26nbsp%3BI%20have%20been%20trying%20to%20use%26nbsp%3BCSOM%2C%20Powershell%20and%20Rest%20to%20achieve%20that%20with%20no%20success%26nbsp%3B-%20I%20can%20only%20do%20that%20for%20the%20current%26nbsp%3Buser.%20%26nbsp%3B%3CBR%20%2F%3EIdeally%2C%20I%20would%20like%20the%20process%20to%20run%20every%20night%20and%20set%20all%20new%20users%20and%20users%20who%20%22un-followed%22%20my%20site%20to%20follow%20it%20again.%20Is%20it%20possible%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-70444%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-141653%22%20slang%3D%22en-US%22%3ERe%3A%20Follow%20a%20site%20programmatically%20on%20behalf%20of%20another%20user%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-141653%22%20slang%3D%22en-US%22%3E%3CP%3EDid%20you%20found%20a%20way%20to%20achieve%20what%20your%20goal%2C%20we%20have%20the%20same%20request.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-70678%22%20slang%3D%22en-US%22%3ERe%3A%20Follow%20a%20site%20programmatically%20on%20behalf%20of%20another%20user%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-70678%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20the%20response.%20%26nbsp%3BI%20am%20aware%20of%20the%20featured%20links.%20We%20want%20the%20users%20to%20see%20the%20corporate%20site%20news%20displayed%20in%20the%20SharePoint%20home%20page%20though.%20%26nbsp%3B%3C%2FP%3E%3CP%3EYesterday%20we%20found%20this%20release%20note%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmspoweruser.com%2Fmicrosoft-announces-new-sharepoint-onedrive-features%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmspoweruser.com%2Fmicrosoft-announces-new-sharepoint-onedrive-features%2F%3C%2FA%3E%26nbsp%3Bthat%20says%20a%20new%20feature%20is%20being%20released%20that%20allows%20creation%20of%20Communication%20sites.%20Looks%20like%20the%20decision%20is%20to%20wait%20for%20that%20feature.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-70670%22%20slang%3D%22en-US%22%3ERe%3A%20Follow%20a%20site%20programmatically%20on%20behalf%20of%20another%20user%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-70670%22%20slang%3D%22en-US%22%3E%3CP%3EI%20know%20that%20this%20does%20not%20directly%20answer%20your%20question%2C%20but%20did%20you%20know%20that%20a%20SharePoint%20tenant%20admin%20can%20update%20the%20list%20of%20%22Featured%20Links%22%20that%20are%20displayed%20on%20the%20SharePoint%20home%20page%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20151px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F14731iCCEE3694634A0270%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20alt%3D%22TechCommunity1.png%22%20title%3D%22TechCommunity1.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20164px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F14732i0615E21AD34E95AC%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20alt%3D%22TechCommunity2.png%22%20title%3D%22TechCommunity2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1541647%22%20slang%3D%22en-US%22%3ERe%3A%20Follow%20a%20site%20programmatically%20on%20behalf%20of%20another%20user%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1541647%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20achieve%20this%20using%20the%20Microsoft%20Graph%20API.%20See%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fsite-follow%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fsite-follow%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I have a site in SharePoint Online that I would like all users in my organization to follow.  I have been trying to use CSOM, Powershell and Rest to achieve that with no success - I can only do that for the current user.  
Ideally, I would like the process to run every night and set all new users and users who "un-followed" my site to follow it again. Is it possible? 

4 Replies

I know that this does not directly answer your question, but did you know that a SharePoint tenant admin can update the list of "Featured Links" that are displayed on the SharePoint home page?

 

TechCommunity1.pngTechCommunity2.png

Thanks for the response.  I am aware of the featured links. We want the users to see the corporate site news displayed in the SharePoint home page though.  

Yesterday we found this release note:

https://mspoweruser.com/microsoft-announces-new-sharepoint-onedrive-features/ that says a new feature is being released that allows creation of Communication sites. Looks like the decision is to wait for that feature.

Did you found a way to achieve what your goal, we have the same request.

You can achieve this using the Microsoft Graph API. See - https://docs.microsoft.com/en-us/graph/api/site-follow