I realized that SharePoint exposes a REST GET API. While I am logged into SharePoint, I am able to invoke the API using my browser URL bar without explicitly writing credentials into the GET request. However, I would like to be able to make a request based on that same session in a JavaScript HTTP request (without filling in credentials). Is that possible? If so, how does one do it?
-
Does this answer your question? How to access Session variables and set them in javascript?ControlAltDel– ControlAltDel2020-02-24 16:47:21 +00:00Commented Feb 24, 2020 at 16:47
-
It depends on what variable I need to obtain. From what I can see it should either be a Bearer token or basic auth (username+password). I will have to look into that before I can answer youmstaal– mstaal2020-02-24 17:02:58 +00:00Commented Feb 24, 2020 at 17:02
-
No, it does not answer my question. The answer does not tell me how to obtain the parameters I need. Or do you know the names of them, @ControlAltDel?mstaal– mstaal2020-02-24 19:31:06 +00:00Commented Feb 24, 2020 at 19:31
-
Does this answer your question? stackoverflow.com/questions/6918314/…ControlAltDel– ControlAltDel2020-02-24 19:55:03 +00:00Commented Feb 24, 2020 at 19:55
-
From what I can see: No, it does not answer my question. It does not tell me 1) what parameters to obtain, 2) whether they can be obtained, 3) how to make the requestmstaal– mstaal2020-02-24 20:08:36 +00:00Commented Feb 24, 2020 at 20:08
Add a comment
|