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

Unable to get token for sharepoint

未关闭
#24 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
PowerShell
星标
62
派生
27
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。