can't access oneDrive recycle bin
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
Piste de recherche
Commencez par l’endpoint documenté de recycle-bin et l’appel à GraphServiceClient dans l’exemple Java complet, puis reproduisez la réponse 400 en utilisant l’autorisation d’application indiquée et la version 6.29.0 du SDK. Comparez la requête du point d’entrée des éléments de recycle-bin avec la requête Drive fonctionnelle ; le travail est terminé lorsque vous avez déterminé si l’échec se situe dans la requête du SDK ou dans le comportement du service/de l’API et consigné les éléments de preuve.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
from an app with Application permissions.
I try to get the recycle bin content of a user with using the call listed here
https://learn.microsoft.com/en-us/graph/api/filestoragecontainer-list-recyclebinitem?view=graph-rest-1.0
that is to say
GET /storage/fileStorage/containers/{containerId}/recycleBin/items
In containerId, I put the driveId of the user.
with the last java sdk, it looks like this
graphClient.storage().fileStorage().containers().byFileStorageContainerId(fileStorageContainerId).recycleBin().items().get();
But I get this error
com.microsoft.graph.models.odataerrors.ODataError: One of the provided arguments is not acceptable.
but using the same driveId, this call do work as intended
graphClient.storage().fileStorage().containers().byFileStorageContainerId(fileStorageContainerId).drive()
I do have the permission FileStorageContainer.Selected enabled for the application
I already tried to ask in another place to see if there is a problem with the way I use the call but didn't have any relevant anwers.
https://learn.microsoft.com/en-us/answers/questions/2180582/getting-the-contents-of-the-recycle-bin-from-msgra
Expected behavior
this call
graphClient.storage().fileStorage().containers().byFileStorageContainerId(fileStorageContainerId).recycleBin().items().get();
should give me a list of drive items
How to reproduce
with app permission, call this and put in fileStorageContainerId a user's drive id.
graphClient.storage().fileStorage().containers().byFileStorageContainerId(fileStorageContainerId).recycleBin().items().get();
If the problem is reproduced, you will get an error
here is a complete code
import com.azure.identity.ClientSecretCredential;
import com.azure.identity.ClientSecretCredentialBuilder;
import com.microsoft.graph.models.RecycleBinItemCollectionResponse;
import com.microsoft.graph.serviceclient.GraphServiceClient;
import jakarta.annotation.PostConstruct;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class RpiApigraphTestApplication {
public static void main(String[] args) {
SpringApplication.run(RpiApigraphTestApplication.class, args);
}
@PostConstruct
public void myMain() {
final String clientId = "";
final String tenantId = "";
final String clientSecret = "";
final String[] scopes = new String[]{"https://graph.microsoft.com/.default"};
final ClientSecretCredential credential = new ClientSecretCredentialBuilder()
.clientId(clientId).tenantId(tenantId).clientSecret(clientSecret).build();
if (null == scopes || null == credential) {
System.out.println("error");
}
final GraphServiceClient graphClient = new GraphServiceClient(credential, scopes);
String fileStorageContainerId = ""; //put the driveId Of a user Here
//works as intended
graphClient.
storage().fileStorage().containers().byFileStorageContainerId(fileStorageContainerId).drive();
//will return an error
RecycleBinItemCollectionResponse result =
graphClient.
storage().fileStorage().containers().byFileStorageContainerId(fileStorageContainerId).recycleBin().items().get();
System.out.println("");
}
}
SDK Version
6.29.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
error 400
Method threw 'com.microsoft.graph.models.odataerrors.ODataError' exception.
com.microsoft.graph.models.odataerrors.ODataError: One of the provided arguments is not acceptable.
Configuration
No response
Other information
No response
- 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
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Ouvertearea/plugin
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
kestra-io/plugin-kestra#190 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Add canonical URLs and a sitemap Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
apache/rocketmq-dashboard#5064 ·
-
Consent portal: creating a duplicate Purpose shows a generic error instead of "already exists" Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
wso2/dpdp-accelerator#287 ·