Hello,
I am a developer working on building an integration for my web app to query the Common Data Service APIs. I have been following the docs on how to authenticate with CDS and set up my application Azure Active Directory, but I am very confused on how to make this easy for my users to set up. I ultimately want my users to install a solution from AppSource, authenticate through my web app, and start using the integration as needed.
I'm specifically confused with the last section of the multi-tenant authentication docs that recommend the following:
> You must include a custom security role which defines what privileges your application requires and then make sure that the application user is associated to that custom security role. Because a custom security role can be included in a solution, you should prepare a managed solution which contains the definition of the custom security role and any other solution components your application requires.
> However, the application user cannot be included with a solution so you will need to provide a way to create this application user and associate it with the custom security role.
> There are several ways that you can achieve this, including writing your own program using the web services and having the subscriber run the program.
I understand what a "managed solution" does, but where I'm confused from the above is:
* Can I write code that runs as part of the installation process of my Appsource package? If so, where are the docs to help get me started on that?
* If I am not able to write code, how do folks generally handle the creation of the user? Do you share a script with your customers to run, have them create it manually, or do something else?
Thank you!