In order to register Jira/Confluence as an app first go to the Azure Portal. There select the Azure Active Directory service and click on App registrations under Manage. Create a new registration by clicking on New application registration. Enter a name for the application and provide the URL under which Jira/Confluence is available.
After creation click on Settings for the newly created application. First select Reply URLs and add the following two URLs (where http://jira.mycompany.com/
is the root URL of your Jira/Confluence installation):
Then select Keys and add a password for the application. Upon saving the password will be revealed.
With the App ID of the registered application and the added password the plugin can be configured (under System → OpenID Connect SSO → Preconfigured Providers). The Directory ID can be viewed in the Azure Portal under Azure Active Directory → Properties. Optionally you may add Default Groups if you wish to automatically create new users on their first login.