Skip to content
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

Authentication Problems #76

Closed
Cesaaar opened this issue Jun 21, 2018 · 7 comments
Closed

Authentication Problems #76

Cesaaar opened this issue Jun 21, 2018 · 7 comments

Comments

@Cesaaar
Copy link

Cesaaar commented Jun 21, 2018

Hi,

I use sharepoint in Cloud and from yesterday I have an authentication error: "An error occurred while retrieving token: AADSTS70002: Error validating credentials. AADSTS50126: Invalid username or password. An error occurred while retrieving auth cookies"

Do you have some similar issues? It's a problem of Azure AD??

many thanks for support

Andrea

@DuiduiLi
Copy link

Are you using the method acquire_token_for_user(usernameg, password)?
If so, the password param is not the password you log in sharepoint, but the office 365 app id.

@Cesaaar
Copy link
Author

Cesaaar commented Jul 13, 2018

@DuiduiLi until June 20, I carried out the authentication to a site sharepoint with username and password, so now I have to register an office 365 app connected to the site sharepoint? correct?

@Cesaaar
Copy link
Author

Cesaaar commented Aug 5, 2018

Resolved. The issue was the use of a company user, for which a check is performed, only via browser, between Azure Active Directory and internal Active Direcotry. For the batch script, I have created a user in the cloud AAD.

@matt-duke
Copy link

Are you using the method acquire_token_for_user(usernameg, password)?
If so, the password param is not the password you log in sharepoint, but the office 365 app id.

Can you explain what is meant by office 365 app id?

@prasanta
Copy link

@Cesaaar @DuiduiLi @matt-duke @jimr @mirontoli
is the Solution the error thread is creating new account in Cloud.
What is the issue using company id, where any permission require to provide in Organisation side.

@Vasavi1308
Copy link

@DuiduiLi until June 20, I carried out the authentication to a site sharepoint with username and password, so now I have to register an office 365 app connected to the site sharepoint? correct?

Can you please elaborate on what is office365 app id. i also have the same error when using acquire_token_for_user(usernameg, password) with my SP login id and password. Thanks in advance

@achyutaparida
Copy link

when I am trying to execute following code I am getting error

from office365.runtime.auth.authentication_context import AuthenticationContext
from office365.sharepoint.client_context import ClientContext
url = ""
ctx_auth = AuthenticationContext(url)
ctx_auth.acquire_token_for_user("username", "password")
ctx = ClientContext(url, ctx_auth)
print(ctx)
Error is
AttributeError: 'NoneType' object has no attribute 'text'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants