I made an app that is designed to run as a service without user intervention. (it works correctly in my own AAD, it does oAuth call and gets a token and everything is lovely ;))
It's application object lives in my Azure active directory and is configured as multi tenant and has a client secret.
Now I want to get it listed in another AAD tenant and be permitted to access data. Idealy I would want to have a helper application with a button to click after which my app is authorized to run from the users' AAD and access their data/api. From what I read, the granting of the permissions by an admin would create a service principal in the admin's AAD and i'm done.
Can anybody help me with the code that I can call with the "magic" button?