Im trying to scrape the web, but as a output getting an error with AADSTS165000: Invalid Request
.
My Python code is pretty simple:
import requests
s = requests.session()
link = 'https://login.microsoftonline.com/.../login'
email = {'loginfmt':'...',
'passwd':'...',}
loging = s.post(link, data = email)
f = open('123.txt', 'w')
f.write(loging.text)
f.close()
But getting html output wiht The request did not return all of the form fields. Failure Reasons:[Missing session context cookie;Token was not provided;]
How can I emulate all the requirements to sucessefully loggin in and get the html?