3
Answers

Get the list of sites that every user is following

Hi i am trying to get list of all sites that every user in the company is following. My scenario is that i wanted to display for each individual user and the sites he is following. Only by using Rest api can anyone help?
Answers (3)
0
Dharmraj Thakur

Dharmraj Thakur

249 7.7k 718.3k 7y
Hi brother hope you are doing well,
 
For server side data manipulation you have to tell me what you are using in backed like ado.net, entity framework or stored procedure.
 
After the manipulation I picturize the data look like following in response of request. You should return json data like following and program to retrieve result type of below.
 
  1. [  
  2.     {  
  3.         "UserID":1,  
  4.         "UserName":"Phanendra",  
  5.         "FollowingSites":[  
  6.             {  
  7.                 "SiteName":"Google",                  
  8.                 "SiteURL":"www.google.com",                  
  9.             },  
  10.             {  
  11.                 "SiteName":"C-SharpCorner",                  
  12.                 "SiteURL":"www.c-sharpCorner.com",                  
  13.             },  
  14.             {  
  15.                 "SiteName":"Yahoo",                  
  16.                 "SiteURL":"www.yahoo.com",                  
  17.             }  
  18.         ]  
  19.     },  
  20.     {  
  21.         "UserID":2,  
  22.         "UserName":"Dharmraj Thakur",  
  23.         "FollowingSites":[  
  24.             {  
  25.                 "SiteName":"Skype",                  
  26.                 "SiteURL":"www.skype.com",                  
  27.             },  
  28.             {  
  29.                 "SiteName":"Stackoverflow",                  
  30.                 "SiteURL":"www.stackoverflow.com",                  
  31.             }  
  32.         ]  
  33.     }  
  34. ]  
 Thanks.
0
Khaja Moizuddin

Khaja Moizuddin

165 11.5k 1.9m 7y
what is your exact question , on which basis you want to retreive the sites.
-1
Prashant Kumar

Prashant Kumar

216 8.8k 3.3m 7y
hi, Hope below solution will help you.
 
https://sharepoint.stackexchange.com/questions/73819/how-to-get-list-of-all-users-following-a-site
 
Thanks