Offline is easiest. Online is not possible using Office 365. I haven
The following is my attempt to get the app to use an authentication mechanism other than password based. Open up the app and sign-in with Office 365. In the app create a reference to Azure AD. The next screen will look like this below. Choose Azure AD and type your tenant name here. Enter a password here and also give your reference a name. When you see the screen that says “Creating a connection to AD”, click Continue. This is where you will need to choose something like “Active Directory Federation Services”. Next click “Next” and go to the section of the dialog box below. Here you need to choose your tenant password and create an empty password for your “Reference”. Next enter your reference's password and click Continue. Enter your domain name and click the OK button. You will get back a warning that the connection was created successfully, but you will still be.