Guest User

Untitled

a guest
Feb 18th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. //Provide your client secret genereated from your app
  2. "scope ": "https://graph.microsoft.com/.default"
  3. },
  4. success: function (response) {
  5. console.log(response);
  6. token = response.access_token;
  7.  
  8.  
  9. $.ajax({
  10. url: 'https://graph.microsoft.com/v1.0/me/planner/tasks',
  11. type: 'GET',
  12. dataType: 'json',
  13. beforeSend: function (xhr) {
  14. xhr.setRequestHeader('Authorization', 'Bearer '+token+'');
  15. },
  16. data: {},
  17. success: function (results) {
  18. console.log(results);
  19. debugger;
  20. },
  21. error: function (error) {
  22. console.log("Error in getting data: " + error);
  23. }
  24. });
  25. }
  26.  
  27. })
  28. }
Add Comment
Please, Sign In to add comment