First, you need to set App_A as a multi-tenant application, go to the manifest of App_A, find the signInAudience attribute, set it with AzureADandPersonalMicrosoftAccount
or AzureADMultipleOrgs
.
Next, run admin consent url in the browser, and then you need to log in with tenant B administrator account and consent. The multi-tenant application will then be added to the target tenant as an enterprise application. https://login.microsoftonline.com/{tenant_B_id}/adminconsent?client_id={App_A_client_id}
.
Then you can find App_A in the enterprise application of tenant B and view its permissions (this permission is granted by you in tenant A). Next you will be able to use the client credential flow to obtain a token, and then using that token you will be able to create a subscription for the channel on tenant B.