Forum Discussion
Generate URL for "Following" a SharePoint site?
jondotgov I have found a workaround of sorts, working with Power Automate and HTTP requests to SharePoint. It's not an ideal solution, but it's the closest I could find without a complicated authorisation procedure (I analysed the API request done when clicking that star, it's OneDrive for some reason and it requires an authorisation token):
I made a SP list with a button "follow" that initiates this flow (you can think of a possible other trigger for the flow)
Then, I collect the email of the person who clicked it and use it in the following request:
You can pack the site name into a variable as well, and replace "Demo_IT" with it.
The problem with this API call is, while you now see this site among your followed sites on the SharePoint page and in the navigation on your left (eventually, the site takes a while to appear there), the star on the site still appears as if you are not following it. The reason is possibly because when you look at what happens when you click the star, this is a OneDrive request (don't ask me why):
So, this is what I was able to do so far. I hope it helps. If you find a way gto actually use the OneDrive API in a flow or link successfully, let me know!