Azure-Samples / Azure-Samples/ms-identity-python-daemon

Unable to get token for sharepoint

Offen
#24 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
PowerShell
Sterne
62
Forks
27
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi everyone

I'm trying to use this library to authenticate with microsoft using a python deamon. I need to use it to access sharepoint lists so the scope I'm using is `https://mytenant.sharepoint.com/AllSites.Read`. But I'm always faced with the following error:

```AADSTS1002012: The provided value for scope https://mytenant.sharepoint.com/AllSites.FullControl is not valid. Client credential flows must have a scope value with /.default```

When trying to use the scope `https://mytenant.sharepoint.com/.default`, it returns an access token but the sharepoint api returns `Unsupported app only token.`. I've already given the permissions `AllSites.FullControl`, `Sites.FullControl.All`, `Sites.Search.All` and many others related to sharepoint on the apps registration portal of Azure AD.

Is it not possible to query sharepoint with a "deamon". Is it not possible without redirecting the user to a browser login?

Thanks in advance

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.