shareplum icon indicating copy to clipboard operation
shareplum copied to clipboard

Error authenticating against Office 365. Error from Office 365:', 'AADSTS53003: Access has been blocked by Conditional Access policies. The access policy does not allow token issuance.

Open xingfengf21 opened this issue 2 years ago • 4 comments

This is my code. Who can solve this problem

from shareplum import Site from shareplum import Office365 from shareplum.site import Version

Office 365 Authentication

authcookie = Office365('https://xxxxxx.sharepoint.com/', username='[email protected]', password='Spinfo@01234').GetCookies()

authcookie = Office365('https://xxxxxx.sharepoint.com/',

username='[email protected]', password='password').GetCookies()

print(authcookie) site = Site('https://xxxxxx.sharepoint.com/sites/site5', version=Version.v365, authcookie=authcookie, verify_ssl=True)

dir = 'Shared Documents\test' f = site.Folder(dir)

for file in f.files: print('--------') print(file) d = f.get_file(file['Name']) print(d)

for folder in f.folders: print(folder)

xingfengf21 avatar Jun 22 '22 06:06 xingfengf21

Hi @xingfengf21, Even, I'm facing the same error have you found any solution? Kindly let me know if you find any solution.

manoharkakumani avatar Sep 22 '22 05:09 manoharkakumani

Hi @xingfengf21 , I face the same mistake. Have you found a solution? If you find any solution, you can email me the solution 。 email:[email protected] tks

CYT7 avatar Oct 19 '22 01:10 CYT7

Hi There - I also get the same problem. I would be very grateful if someone has a fix!

amarquand avatar Oct 25 '22 18:10 amarquand

Ran into a similar problem at the line "authcookie = Office365(xxxx)"

'Error authenticating against Office 365. Error from Office 365:', "AADSTS50005: User tried to log in to a device from a platform (Unknown) that's currently not supported through Conditional Access policy. Supported device platforms are: iOS, Android, Mac, and Windows flavors.")

rogue117 avatar Nov 08 '22 02:11 rogue117