I have a console app written in C#. I need to get some of the information from several of the SharePoint sites on my SharePoint Online instance. For this question, let's assume I only need to get the title of these sites.
I have registered my console app with Azure Active Directory. This console app is created in the same Azure Active Directory that SharePoint Online is hosted in. I have also granted the "Read items in all site collections" delegated permission for the "Office 365 SharePoint Online" API. Now, I need to write my code.
I was trying to follow the directions shared here. However, this does not seem to address my scenario. In my situation, I just have a console app sitting on a server. I've setup a test user with a username / password for SharePoint. I also have the client ID for the console app I registered with Azure Active Directory and a Redirect URL.
How can I use the username / password to retrieve the title of a SharePoint Online site via C#?