thybag / PHP-SharePoint-Lists-API

A simple PHP API to make working with SharePoint lists easy.
MIT License
184 stars 95 forks source link

Error (HTTP) Forbidden,more= #150

Open baltechies opened 5 years ago

baltechies commented 5 years ago

exception

How to resolve this error?

thybag commented 5 years ago

Do you have a snippet of your code I can have a look at at all? (re: just how the library is being booted/setup) - looks like auth is failing.

dissolvdgrl commented 5 years ago

I had the same issue, correct credentials.

I solved it by linking directly to the WSDL file and not downloading it and link to a local folder.

$sp = new SharePointAPI('youremail@mail.com', 'supersecurepassword', 'https://yoursite.sharepoint.com/sites/SomeSite/_vti_bin/Lists.asmx?WSDL', 'SPONLINE');

Skinka commented 4 years ago

Hi. I have same error.

$sp = new SharePointAPI(
    'mail@mail.com',
    'password', 
    'https://site.sharepoint.com/sites/smoSite/_vti_bin/Lists.asmx?WSDL'
);
dd($sp->getLists());

if I put fourth parameter "NTLM", I have other error: Access Denied.

What do I need to do to work correctly

Enoch04 commented 2 years ago

I entered in the URL of the WSDL and it gives the same error.

here is a snippet of the code. SharePointOnlineAuth php_line_101