-
-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sharepoint Binary Security Token #333
Comments
Did anyone figure out a way to handle this issue? |
I am running into the same issue. |
I too got this error. |
I was also having a similar issue when using environment variables. Turns out that os.getenv("USERNAME") will return my computer's username, not the USERNAME variable as specified in my .env file. I renamed the variable in my .env file to USER and it worked. |
Please provide a solution for this error,I have tried using the mail as the username..but still i see this error. |
|
Anyone fixed the issue? |
Only issue could be with your username value it should be proper email 'xyz@email.com' check this properly. |
Hello, has anyone solve it? I face the same error when running the script from Lambda, but not from my local computer. That may me think that it may have something to do with the cookies thing in Lambda (I don't know much about this). I would appreciate any guidence |
This is an on going issue, if you have Duo enabled on a account, getting the token is not possible |
I was getting this problem when I used I got much further and managed to get a 403 error when trying to upload a file but that's a different problem. |
still getting this error in 2023. Any updates? I tried using |
For me it works perfectly when running my script as full username: Still not finding something to fix this issue in docker container. |
Currently running into the same issue running in a Jupyter notebook from a docker container. Will investigate behaviour in a direct python script tomorrow. |
I'm having the same issue. I've had a system running for 2 years using shareplum to download a file from sharepoint. A couple of weeks ago it started throwing an error on the download. Doing some research I found that shareplum is not longer actively supported and decided to switch to Office365-REST-Python-Client, which doesn't work. Since shareplum worked fine for years, and just started breakiing, I'm wondering if this is indicative of anything in my O365 account that our admins changed. Any idea about what would prevent username/password authentication? |
@cestes - were you able to resolve the issue? I have been running a weekly python script for several weeks now that uploads data into my SharePoint site. It also uses the shareplum library. The script stopped working on May 15th, 2023. |
This way worked: import json
from office365.runtime.auth.user_credential import UserCredential
from office365.runtime.http.request_options import RequestOptions
from office365.sharepoint.client_context import ClientContext
site_url= ""
client_id = ""
client_secret = ""
ctx = ClientContext(site_url).with_credentials(UserCredential("xyz@example.com", "password"))
endpoint_url = "{0}/_api/web/".format(site_url)
response = ctx.execute_request_direct(endpoint_url) The error you are encountering is due to passing a To fix this issue, you need to pass the URL as a string instead of a |
Can anyone confirm if this error ('Cannot get binary security token for from https://login.microsoftonline.com/extSTS.srf') occurs due to a limitation of the Microsoft Developer free account? I am referring to this program: https://developer.microsoft.com/en-us/microsoft-365/dev-program. |
@ValberRodr Same things is also happaning to me also, I have currently microsoft 365 free account but not able to get token, Don't sure that's due free account. |
@ValberRodr @masum13 same issue with me also |
i haven't tried to troubleshoot the issue for a few months now. hate to admit but i gave up on trying to resolve this 😳On Jan 19, 2024, at 06:10, Piyush-CompufyTechnolab ***@***.***> wrote:
@ValberRodr @masum13 same issue with me also
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
For anyone else running into a similar problem: Mult-factor Authentication? https://learn.microsoft.com/en-us/answers/questions/1056853/fail-to-access-sharepoint-with-user-credentials |
Is this issue resolved? as I'm also getting the same error. Any documentation or link would be appreciated. Tried both the types of username |
I received this error today while testing out Sharepoint access from a desktop environment. I was thinking it was due to the Python client codebase attempting to access the cloud, while my org's servers are all on-premise and have no cloud registration. But if it is some lesser issue I would love to see that. I tried VictorIBueno's suggestion, but unfortunately received the same error.
|
If you open the |
Disabling security defaults from Entra admin center worked for me - https://learn.microsoft.com/en-us/entra/fundamentals/security-defaults |
It's likely that this we won't be able to disable security defaults in production environments. What can be done in that situation? |
I really wish I knew. I haven't worked on troubleshooting this issue for quite some time now...On Aug 7, 2024, at 12:55, Matthew Ouyang ***@***.***> wrote:
Disabling security defaults from Entra admin center worked for me - https://learn.microsoft.com/en-us/entra/fundamentals/security-defaults
It's likely that this we won't be able to disable security defaults in production environments. What can be done in that situation?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Anyone could solve this without disabling ENTRA ID security defaults? |
The problem is with authentication. In my case, I couldn't use my credentials (user and password) because of the way my company setup the access to the Sharepoint. The solution can be found in the section "Setting up an app-only principal with tenant permissions" of https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azureacs Once you have access to client_id and client_secret, use them to create the authentication. Please, see the example below: from office365.sharepoint.client_context import ClientContext client_id="{client id}" ctx_auth = AuthenticationContext(url) else: |
Hello,
My goal is given a sharepoint link to a site folder, to list the files, and to copy any new files automatically to AWS S3. When I run the simple startup script, I am getting the error:
The simple script I am running is:
I am using my Levi organization's username and password to the same site https://levi.sharepoint.com/sites/gdo/ . I can easily access this site in my browser, but the python package is having this authentication error.
What is needed besides username and password to get programatic access to sharepoint folders?
The text was updated successfully, but these errors were encountered: