Guest User Receives 401 "accessDenied" Error When Accessing Shared Files via Microsoft Graph API Despite Valid Authentication
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 20/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- java
- Domaine
- api, authentication, cloud
Piste de recherche
Aucun fichier source ni test n’est indiqué. Commencez par reproduire la requête /shares/{share-id}/driveItem avec le token renouvelé d’un utilisateur invité, puis comparez-la avec /me et avec l’accès depuis l’interface web SharePoint, en utilisant l’issue SharePoint liée comme contexte. La tâche est terminée lorsqu’une cause documentée et une résolution validée de la réponse 401 récurrente sont disponibles.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Refernce similar to this in Sharepoint: https://github.com/OneDrive/onedrive-api-docs/issues/1039
Pattern of failure:
Initial API calls fail with 401
After manually visiting the file through SharePoint web UI, API calls work temporarily (1-4 hours)
API calls then fail again after a period of inactivity
Web UI access requires device code authentication flow
What works:
✅ Basic Microsoft Graph calls (/me) succeed
✅ Accessing files through SharePoint web UI works
✅ Token refresh succeeds and produces valid access tokens
What fails:
❌ Microsoft Graph API calls to /shares/{share-id}/driveItem
Issue Type: Microsoft Graph API Authentication
Affected Service: SharePoint Online for Business
User Type: Guest User (External/Cross-Tenant)
Authentication Method: OAuth 2.0 with Refresh Token
API Endpoint: /shares/{share-id}/driveItem
Problem Description:
As a guest user in your tenant, I am unable to programmatically access shared files via the Microsoft Graph API, despite having:
Valid authentication tokens
Proper API permissions granted
Ability to access the same files through the web UI
Detailed Symptoms:
API calls fail with 401 error:
{
"error": {
"code": "accessDenied",
"message": "There has been an error authenticating the request."
}
}
- Langage dominant
- Java
- Étoiles
- 444
- Forks
- 154
- Merge moyen
- 18 h 28 min
- PR mergées (30 j)
- 4
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoftgraph/msgraph-sdk-java
-
status:waiting-for-triage type:bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
microsoftgraph/msgraph-sdk-java#2610 ·
-
status:waiting-for-triage type:bug
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
microsoftgraph/msgraph-sdk-java#2656 ·
-
status:waiting-for-triage type:bug
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
microsoftgraph/msgraph-sdk-java#2654 ·
-
status:waiting-for-triage
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
microsoftgraph/msgraph-sdk-java#2639 ·
-
Error in PATCH onlineMeeting Ouvertestatus:waiting-for-triage type:bug
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
microsoftgraph/msgraph-sdk-java#2589 · 1 commentaire ·
Toutes les issues de microsoftgraph/msgraph-sdk-java
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
elastic/gradle-plugins#157 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
cryptomator/hub#497 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
johanhaleby/occurrent#1120 ·