I'm working on integrating Office 365 APIs into a web application that has different URLs for each organization (e.g. there could be an installation at http://organization1.com
and an installation at http://organization2.com
). Right now, for development, we have an Office 365 developer tenant and an associated Azure site. On Azure, we registered an application with a local URL as the return URL (e.g. http://localhost
), and we use the Client ID and secret to authenticate calls to the API.
However, once we deploy this into production, we're going to have instances of the web application at many different URLs (one per organization), and organizations will have their own Office 365 account and associated Azure account. Does this mean that organizations will need to add the application themselves into their Azure directory, or is there a way for us to create an application that can be used with arbitrary tenants and return URLs?
What would be the best practice for a situation like this?