Hey all,
So, I know I can make a simple GET/POST request via Visual Lisp, something like this:
(defun web
-get
(url
/ http_object response
) response
)
Command:
(web
-get
"https://jsonplaceholder.typicode.com/todos/1") "{\n \"userId\": 1,\n \"id\": 1,\n \"title\": \"delectus aut autem\",\n \"completed\": false\n}"
And I can use Microsoft's Graph API to make simple requests about my profile:
https://developer.microsoft.com/en-us/graph/graph-explorerSo, when I run the test "
https://graph.microsoft.com/v1.0/me", I can get my profile info.
But the only way that request is fulfilled is because when using the Graph Explorer, the "Access Token" for myself is automatically sent.
I DO KNOW that I can copy that Access Token, then hard-code it into my (web-get ...) function so that I can get my profile...
What I would like to know is HOW can I make a request to GET my Access Token, to subsequently make a second request to get my profile info?
Workflow would look something like this:
- Command initiated to get Profile Info
- Program makes request for Access Token of current logged-in user
- Access Token returned
- Program makes request for profile of same user
- Profile info returned
I should probably note that it would be on a Dell Machine, Windows OS, & I am a user within a company, so I am logged-in as a company user with a default Microsoft Office account 'tied' to my logged in account (idk how it all ties together exactly).
Can retrieving the Access Token via a GET/POST request be accomplished in Visual Lisp?
Best
~DD