How to check if user has logged in to SharePoint Online or not from a web application?
An approach is search for cookies of SharePoint in local machine, but it throw a security problem.
Any solution?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have found the solution, exactly a trick that come from
jQuery.getScript()Using a function that return a string, and place one in web page, one in a
.jsfile and upload to SPO doccument library. For example:This function put in local web page:
This function save in a
xxx.jsfile and upload to SPO:Notice those two function have same name.
Then in local web page, insert the following code:
That’s it.