Office365-REST-Python-Client icon indicating copy to clipboard operation
Office365-REST-Python-Client copied to clipboard

module 'msal' has no attribute 'PublicClientApplication'

Open jkr377 opened this issue 1 year ago • 2 comments

ctx = ClientContext("https://...sharepoint.com").with_interactive(tenant=st.secrets['tenant_id'], client_id=st.secrets['client_id'],scopes=["User.Read", "Sites.Read.All", "Sites.ReadWrite.All" ,"Files.ReadWrite.All"]) web = ctx.web ctx.load(web) ctx.execute_query() st.session_state.sharepointPageInfo = "Web2 title: {0}".format(web.properties['Title'])

I want access to sharepoint via msal and/or office365 REST

But it will not function because in msal package it cant find PublicClientApplication, but it's still there.

Is this an issue from Office365 Rest package or MSAL packagage?

Many thanks.

Or do I have to do something else to authenticate?

jkr377 avatar Feb 14 '24 12:02 jkr377

st.session_state.sharepointPageInfo is only a variable to store pagetitle from Sharepoint, to verify that I am connected right.

jkr377 avatar Feb 14 '24 12:02 jkr377

But the issue seems to be in the package. Because it cant access msal, but i have installed it .

my goal is to upload files to a sharepoint site

jkr377 avatar Feb 14 '24 12:02 jkr377