Description
Hi,
There's a couple of things that need to be updated to get the sample working - at least for me, and I'm using an MS Office subscription.
Firstly, the steps to register the application in the README file are wrong. The portal linked there (apps.dev.microsoft.com) is for adding Office applications and doesn't allow adding custom new ones. This seems to have been replaced by Azure, and the URL that worked for me is https://aka.ms/AppRegistrations/?referrer=https%3A%2F%2Fdev.onedrive.com ... There's a short explanation here: https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration?view=odsp-graph-online . In addition to that, I had to add a web platform in the authentication section for the app and specify a return URL (seems that any one would do).
Also, the target framework version in the C# project need to be updated to 4.6.2, otherwise the login throws a 'The underlying connection was closed' exception, it seems that an old TLS version was being used or something like that.