OK, I have deployed PnP Partner Pack to my company's azure storage account. How does it work. The application is an MVC application. Before I deploy it I have to do the following:
Create a storage account
Create a web app in this storage account
Register the web app in AAD
Assign the following permissions to the web app: SharePOint, Graph
Insert the application ID and secret key in the web config of the solution
Assign URL that needs to access the sharepoint Site collection online inside web.config
Deploy the solution to Azure Web Application
Once it is deployed then I can open the web application which now has access to SharePoint online.
The problem? As long as the Office 365 and Azure Tenant account are the same there is no problem. But now that I don't have anymore the same account for Azure Tenant and office 365, I cannot access sharepoint from my Azure web application. I don't know how to set up the application registration in Azure AD so that it can access sharepoint in another office 365 tenant.
Eg.: Azure Tenant name "email@example.com" needs to access SharePoint, Graph and AAD in office 365 which has the following tenant account "firstname.lastname@example.org".
How can I set it up so from my web application in Azure Web application "adminA@contoso.com") I can access the following SharePoint, Graph and AAD in another office 365 tenant account ("email@example.com")?
Web app that lives in Azure "firstname.lastname@example.org" account needs to accessusers(AAD), SharePoint and Graph of the other office 365 account, i.e: "email@example.com".