Please bare with me as I'm a little confused about this topic in general.
I'm building a teams app with the visual studio code teams toolkit with the aim to publish it on the teams store. The app will use SSO and then I will call the dynamics 365 API to retrieve data.
I initially thought that the app registration for this app would sit on my own azure account (which i have logged into on vs code), however after testing the provisioning of resources I can see it sits on the Microsoft 365 tenant that I am using for testing instead.
This has confused everything in my head and I have a few questions that I can't seem to get to the bottom of.
If the app is sitting on the tenant of whoever downloads the app, can I use a single organisation SSO instead of multiple organisation since the app registration will be in the same tenant as the user? I'm finding this point confusing as I wish to release the app to multiple organisations but each organisation will only be accessing dynamics data from within their own environment.
With the registration being on the Microsoft 365 tenant, I'm not sure how I can assign permissions to the app registration which, for example, will let me make calls to graph and dynamics 365 API. If it was on my own azure account I understand that I can go onto the registration and add an API permission, however I am not sure how I can get it so these permissions are are automatically present when a user downloads the app onto their tenant.
Sorry for the essay, any help clarifying all this in my head would be much appreciated.