After hours of browsing the Internet, reading MS documentation and sample code, I am now just more embarrassed and need some kind of architectural advice.
Basically, I need to develop which APIs are applicable and how to start with them .
Background
I have an existing application (currently a XAML + C # win store 8.1 application) with a WebAPI 2.2 odata backend (as well as some MVC pages).
The client application works fine on Win 8.1 and wins 10 machines. The server side is in the azure virtual machine.
Currently
- Users are registered in the application (as the user with whom they are logged in with) using a Microsoft account
- They do not need to enter usernames / passwords, they just accept the permissions (1x) that I specify with areas, for example. "wl.basic", "wl.emails", "wl.calendars"
- For this, I use the Live Connect libraries (Microsoft.Live.dll, v5.6.0.0)
- Then I get an AuthenticationToken from LiveLoginResult
eg.
_loginResult.Session.AuthenticationToken
- Which I pass to the server along with odata requests.
- The server uses this to find its LiveID / UserID
eg.
LiveAuthClient authClient = new LiveAuthClient(clientId, clientSecret, redirectUrl); string liveIdGuidAsString = authClient.GetUserId(authenticationToken);
- Then I use to find the appropriate user in my database and serve their contents odata to the client application.
Things are good.
I want to expand my application to synchronize with / integrate with user's Outlook calendars
It seems a sensible way to do this these days will be either by
It also seems that MS can disable the Live API that I am currently using anytime?
https://msdn.microsoft.com/en-us/library/hh243641.aspx
Additional complexity
I also (in a couple of months) would like to expand the application to
- be an X platform (possibly using the traditional Xamarin with PCL code sharing and the traditional xamarin platform for the UI, possibly using MVVMCross)
- allow users to use other services for authentication (all OAuth 2.0) - for example. google / gmail accounts
This means that I would like, if possible, to make things raw OAuth for compatibility and NOT to bind myself to any specific MS APIs (obviously, outlook / outlook.com calendar integration would be the only feature available to those users, MS)
In addition, some existing users have outlook.com accounts (which they use to log on to Windows), but have their own calendar information in Hosted Exchange 2010
It seems that you need to access the calendar data, these users will either have to move all their Outlook 2016 data to outlook.com, or configure them as Office 365 accounts, and the data will be transferred to the new accounts.
Questions
1. Where / with whom should I authenticate in order to receive an authorization code and an access token - MS Graph? or Outlook REST API
I saw this answer (i.e. basically prefers MS Graph)
2. Can I save the stunning “no username / password”, just accept the permission functionality “for my users on Windows 8.1 and 10 using“ Microsoft accounts ”?
Of course, with MS Graph, it seems that my Outlook.com/Microsoft Account users will not be able to continue logging into my application based on their Windows users without Username + Password?
The documentation also seems to suggest that in order to use MS Graph, my users must have Office 365 / Azure Active Directory in order to try to minimize exposure and keep a wider audience if I use the Outlook REST API
But then the proposed library for the Outlook REST API looks like ADAL , which seems to rely on Azure Active Directory? So my current outlook.com users will not be able to use it?
3. How long should I replace the Live SDK and use something else?
Basically, I am puzzled by a lot of options and considerations and can make any recommendations regarding which direction (s) to move.