Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Unable to get token for sharepoint

Open
#24 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start by reviewing the daemon's client-credential scope handling and the Azure app registration permissions described in the issue. Compare the /.default token request with the SharePoint API response; done means establishing whether SharePoint accepts this app-only flow or documenting the required authentication path.

Written by the indexing model from the issue text.

Description

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

Dominant language
PowerShell
Stars
62
Forks
27
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

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

All issues in Azure-Samples/ms-identity-python-daemon

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.