Closed huorswords closed 7 years ago
The silent token request exception is expected (when the code can't be renewed), but it should also be handled automatically. Are you saying it rises all the way to your client code?
For the second one, you're saying that you get itemNotFound
when you try to request the root of the drive? Can you post the code you are using for that, and the exception details?
Also, can you post your ServiceResourceId? I want to make sure that URL is formatted correctly.
Thank you by your answer.
Yes, my code is catching an exception every time that I'm trying to connect using
public AdalAuthenticationProvider(string clientId, string clientSecret, string returnUrl, AuthenticationContext authenticationContext = null);
but not when I use the
public AdalAuthenticationProvider(string clientId, string returnUrl, AuthenticationContext authenticationContext = null);
override.
At the other hand, the itemNotFound
error code appears when I try to recover the drive's root. The code that I'm using is:
var request = this.oneDriveClient.Drive.Items[parent].Children.Request().GetAsync();
var collectionPage = await request;
This code works perfectly when I execute it connected to an OneDrive personal account client.
Our ServiceResourceId is https://pasiona1-my.sharepoint.com/.
I am investigating the authentication issue.
What is the parent
variable in the context you provided? Why don't you use this.oneDriveClient.Drive.Root.Children.Request().GetAsync()
to get the children of the root?
The parent
value is, depending on the recursive call tree, the id of the folder element that I'm processing. At first time, it is the root element id value.
The owner method of the code shown is used to search and retrieve recursively all media files from a given directory id.
I'm working on getting a repro of this issue. So far I'm unsuccessful. Is your app a UWP app or a desktop/native app? That impacts which flavor of AuthenticationProvider is created.
Thank you by your efforts, Chris.
Right now, I'm experiencing this issue with a Windows Forms application.
Hello, Really sorry about the delay.
It sounds like your issue is related to the configuration of your app. Please visit this page and make sure you have configured it correctly.
Additionally, since this is as desktop app you should not be providing a client secret (as there is no way for your client to safely pass that info to the login service). Make sure to use the constructor that does not use a client secret.
Once you have done those steps please report back. I'll also try to help you more quickly than last time :)
I'll try to figure out what is wrong with the configuration and I'll be back to explain the progress.
Thanks!
Excuse me by the delay.
I couldn't test the problem properly from the last time I posted, so I'm closing the issue and will reopen it when I have any conclusion about the problem.
Sorry for inconvenience & thanks for your support.
Hi OneDrive team!
I don't know whether this project is where to ask about our issue. If it's not Please consider to redirect me to the appropriate team.
With the objetive of establishing a OneDrive Business connection to retrieve files from the users OneDrive's account, we set up an AAD application in order to allow the access to the required resources.
After configuring it on Azure portal, we wrote the next code snippet:
The situation is:
My questions are:
itemNotFound
error exploring the onedrive client root element?Thanks in advance.
Regards, Ángel