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

Notice: A non well formed numeric value encountered & Error : Uncaught Exception: AADSTS50126 #162

Open
dadwarf opened this issue Apr 16, 2020 · 4 comments

Comments

@dadwarf
Copy link

dadwarf commented Apr 16, 2020

Hi,
I'm sure about my credentials, it's an email and an alphanuméric password. What ever i try to check i have this 👍

`PHP Notice: A non well formed numeric value encountered in xxx\Thybag\Auth\SharePointOnlineAuth.php on line 99

Notice: A non well formed numeric value encountered in xxx\Thybag\Auth\SharePointOnlineAuth.php on line 99

PHP Fatal error: Uncaught Exception: AADSTS50126: Error validating credentials due to invalid username or password. in xxx\Thybag\Auth\SharePointOnlineAuth.php:99
Stack trace:
#0 xxx\Thybag\Auth\SharePointOnlineAuth.php(20): Thybag\Auth\SharePointOnlineAuth->configureAuthCookies(Array)
#1 [internal function]: Thybag\Auth\SharePointOnlineAuth->__doRequest('<?xml version="...', 'https://xxx...', 'http://schemas....', 1, 0)
#2 xxx\Thybag\SharePointAPI.php(278): SoapClient->__call('GetListCollecti...', Array)
#3 xxx\index.php(11): Thybag\SharePointAPI->getLists()
#4 {main}
thrown in xxx\Thybag\Auth\SharePointOnlineAuth.php on line 99`

<?PHP include("SharePointAPI.php"); $wsdl = "https://xxx.sharepoint.com/sites/xxx/_vti_bin/Lists.asmx?WSDL"; $sp = new \Thybag\SharePointAPI("xxx@xxx", "xxx", $wsdl, "SPONLINE"); print_r($sp->getLists()); ?>

Could you help me ?
Thanks

@dadwarf dadwarf changed the title Notice: A non well formed numeric value encountered & Uncaught Exception: AADSTS50126 Notice: A non well formed numeric value encountered & Error : Uncaught Exception: AADSTS50126 Apr 16, 2020
@inuru
Copy link

inuru commented Jun 17, 2020

I faced the exact problem. Have you found the solution?

@jasonalsing
Copy link

Wish this could be resolved. I am migrating from using this on SP2013 (NTLM) to SharePointOnline and was hoping for an easy update to my scripts but using SPONLINE authentication to my new site is not working.

@JIGR1969
Copy link

I'm currently experiencing this problem as well and was wondering if anyone had managed to resolve it?

The credentials I am using work okay when logging onto SharePoint and viewing the list in question. When creating a new API instance using SPONLINE in order to connect to SP, it does not give an error, the error only comes about when trying to access a list.

Not sure if this means that a connection is only made when accessing a list or doing anything with the lists, or if the error is being misreported. If you look at the exception, it talks about credentials being incorrect, but not sure if that is 100% the case.

If I get this working, it'll open a whole new world of possibilities for me in terms of data manipulation. I would use the Microsoft Graph API which I'm sure would work fine, except the company I work for, literally don't want anyone to have access even if it is simply to read the data contained within the lists. :(

@jasonalsing
Copy link

I ended up finding an alternate library as this issue was already 1+ year old when I encountered the issue and there were no comments from the developer I assumed the project was dead. Ultimately I landed on https://github.com/vgrem/phpSPO which did not have quite as easy parsing of the list but at least the SPO login worked (as well as supports client secret login which my company moved to as well)

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

4 participants