Share via

Sharepoint_Databricks_Issues

Rohit Kulkarni 731 Reputation points
2022-09-08T16:04:47.787+00:00

Hello Team,

I am trying to read the data from sharepoint from databricks and try to run the below commands .

auth = sharepy.auth.SharePointOnline(username="svc_bireporting@xyz .com",password="1234")
r = requests.get("https://abcd.sharepoint.com", auth=auth)

create session/connection to SharePoint

auth = sharepy.auth.SharePointOnline(username="svc_bireporting@xyz .com",password="1234")
auth.login_url="https://abcd.sharepoint.com/sites/bisd"
s = sharepy.SharePointSession(site, auth=auth)

I am getting error :

AuthError: Token request failed. Invalid server response

Please advise whether it is becuase of wrong URL/USERNAME/PASSWORD.

Regards
RK

Azure Databricks
Azure Databricks

An Apache Spark-based analytics platform optimized for Azure.


1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 91,866 Reputation points
    2022-09-09T08:23:45.65+00:00

    Hello @Rohit Kulkarni ,

    Thanks for the question and using MS Q&A platform.

    From the above code - I don't find a varaible named site and this could be the reason for the error message:

    s = sharepy.SharePointSession(site, auth=auth)   
    

    Try to replace site with r and see if that works:

    s = sharepy.SharePointSession(r, auth=auth)   
    

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is jhow you can be part of Q&A Volunteer Moderators

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.