Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the examples be more specific? #35

Open
ivannp opened this issue Jan 1, 2017 · 3 comments
Open

Can the examples be more specific? #35

ivannp opened this issue Jan 1, 2017 · 3 comments

Comments

@ivannp
Copy link

ivannp commented Jan 1, 2017

It's extremely frustrating for new users. There are variables which is not shown what they are set to, and sometimes are deprecated. For example:

var msaAuthProvider = new MsaAuthenticationProvider(
    clientId,
    returnUrl,
    scopes,
    /*CredentialCache*/ null,
    new CredentialVault(clientId));
authTask = msaAuthProvider.RestoreMostRecentFromCacheOrAuthenticateUserAsync();
app.OneDriveClient = new OneDriveClient(this.oneDriveConsumerBaseUrl, msaAuthProvider);

First it seems that this code fragment is outdated based on the latest version of the library.

My biggest frustration was with oneDriveConsumerBaseUrl - no explanation where it comes from. Not even an example so that we can try to deduce its meaning.

Even for clientId and returnUrl it would have been useful to show an example what they are, and more importantly, where to get them from.

A simple 5-10 line command line example, showing the different authentication types, including non UWP, desktop apps would have been much more helpful IMO. Check GoogleDrive examples.

@kevitra
Copy link

kevitra commented Jan 26, 2017

I agree. I have spent a lot of time trying to figure this out and it isn't clear at all.

@escape-llc
Copy link

@kevitra if you figured out stuff, can you share it here? I agree it is far from useful. Here, I'll start!

I was able to determine that:

  1. clientId is the GUID you get from registering your application for Graph API. Nothing works right until you complete this step! My page showed two different kinds of app registration, and you must use Converged Applications not Live SDK!
  2. returnUrl is actually a fixed value for e.g. desktop: https://login.live.com/oauth20_desktop.srf I didn't save the URL where that tidbit showed up; I think the OAuth2 topics had it.
  3. userId (not shown here but one of the parameters) i think is the value from CurrentAccountSession.UserId.

@AndersRisager
Copy link

All sample projects like "OneDriveApiBrowser" for standard winform should be updated to include refresh tokens.

What app would not want to use this or at least demonstrate how to.

Does Microsoft not care about this? Why are you not replying to the issues?

How to integrate to OneDrive keeps changing and MS is forcing businesses to change from the deprecated "OneDrive Rest Api", so please make sure the SDK has updated samples and documentation.

It's hard to believe this post 13 months old.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants