I have a mobile application (Java), and right now I am trying to authenticate users. I have managed to implement OAuth2 for Online CRM, the endpoint being "login.microsoftonline.com/.../authorize". I have acquired an access token after all, which, as I understood, I would use later for, say, creating activities.

But the question is - how to authenticate On Premises user? Should I use OAuth2 here, too, and if yes, what endpoint will it be?