Gowtham

Gowtham

  • NA
  • 516
  • 40k

How to retrieve the my task planner for multi user login

May 16 2018 8:52 AM
I was working on planner to retrieve current login user plan to the web parts. Through Microsoft graph API and post man authentication I managed to fetch the planner details for user 1 but for every user I have to add app from https://apps.dev.microsoft.com/ to give permission access at all the time, Logically it is not possible to add apps to all the users in an organization. So please let me know how to get task planner for each login user through rest API.
 
The tools which I was working to get access token and apps registration.
 
https://apps.dev.microsoft.com/ - for app registration through I managed to get client id and secret id.
 
https://www.getpostman.com/ - though this I managed to get access token and refresh token.
 
The code which I used to retrieve
  1. $.ajax({  
  2. "async"true,  
  3. "crossDomain"true,  
  4. "Access-Control-Allow-Origin""*",  
  5. "url":"https://login.microsoftonline.com/common/oauth2/token",  
  6. "method""POST",  
  7. "headers": {  
  8. "content-type""application/x-www-form-urlencoded"  
  9. },  
  10. "data": {  
  11. "grant_type""refresh_token",  
  12. "redirect_uri":"https://www.getpostman.com/oauth2/callback",  
  13. "client_id""************"//Provide your app id  
  14. "client_secret""*********"//Provide your secrect id,get refresh token from post man tool  
  15. "refresh_token":"AQABAAAAAADX8GCi6Js6SK82TsD2Pb7roZ3YbyHBdrEanv6jMD4nyB25XsgHqdOAk135_pANU9eUGEyX0NCcRa_3GqYELJkyaN8dFQyiHKZoesv__WvDYgb1RmUORKOjJPFflRxcEFTt7TDQllJCfC_eYajh_DatnvNc2983hqbJ1g16UedhrPIg4nGhzUTlEEZHVsggQbb3RQ-OeUL9NK6bveDMOW8_CvlIdXS1i1Dfe5DQKPeFLgWMZc5dpe5_VXvYBzu0ZlvM1IkixBlri3A4wWQ278Ks2ymsNTlW-uvVpLdeu0MSyWnH5pvcGyFMl6tsfzl8iY_60GVUiIra-w7D4DuBA8iqRzzcM90oQMUbYtxUhZsX9RacyiB01jEduTUryAepMZRhB7CjtKkPI257JxwFovNSDE2TFsfDp1Vq9hrTlwXp3TmgRNG2_QsRKNSU79xm6GS_uN48-vDUECHgediYmXKbRUqnb9b3S7YirqOJIi8bUE1npZlxAar5ymM4-p8QjyyapuXIxjiJMZGeJgCiONN2uIRZlWPV12W8REEgDGXlfbqHHMnbrSiB6R6O5z_bgO2Mu_ArqyzHVDXvvGx3uGtVs8KQQzBw8QPJjMnjc-v44OiNDzRK65U_336hveCiTQHhoLwkJ0ASDFfYrY7Pe8pKL8vGd31C-Gh6MRxqKsZTAkOgSfrLQlO7umglkL8Zh02KuZYu-x9xNIX22rhiGWwKLAmRIy8qxo2C5soe69K3Ou8_U5iSMKwUgdx5XL9qI0y0TStqJelDVSeoNFJfhJqogitm9VEG6SlqeAqh0cr2GyAA",  
  16. "resource":"https://graph.microsoft.com/"  
  17. },  
  18. success: function(response) {  
  19. token= response.access_token;  
  20. getplanner1();  
  21. }  
  22. });  
Let me know how to retrieve task planner based on user id.

Answers (1)