microsoftgraph / microsoftgraph/msgraph-sdk-python

me-token-to-replace not being replaced

Aberta
#1,271 0 comentários 2 reações 1 responsável Ver no GitHub

@ramsessanchez já está trabalhando nisso.

Desde 18/5/2026.

type:bug
Linguagem predominante
Python
Estrelas
630
Forks
96
Merge médio
15h 20min
PRs com merge (30d)
3

Descrição

I am following the same tutorial as in #544 ( https://learn.microsoft.com/en-us/graph/tutorials/python?tabs=aad ) and getting the same error. As that issue is closed, I can't re-open it. The error is that the URL used in the ultimate request includes the path component me-token-to-replace:

https://graph.microsoft.com/v1.0//users/me-token-to-replace/mailFolders/inbox/messages?$orderby=receivedDateTime%20DESC&$select=from,isRead,receivedDateTime,subject&$top=25

And the error returned by the server is:

Response content: {"error":{"code":"ErrorInvalidUser","message":"The requested user 'me-token-to-replace' is invalid."}}

I would like to know if there has been any progress on solving this or workarounds? The ticket listed in the comments is still open and it was suggested it would be fixed more than a year ago. I have used both DeviceCodeCredential and InteractiveBrowserCredential with the same error.

One of the workarounds, using graph_client.users.by_user_id instead of graph_client.me might work except I can't hardcode the user_id in the long term.

If it makes any difference, I'm running on RHEL9, Python 3.9, msgraph sdk version 1.35.0 and all dependencies the latest versions downloaded as of today. Thanks for any help!

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.