So I have an On-Prem SharePoint contract management app that has a bunch of custom webparts that talk to a custom back-end On-Prem SQL database. The app creates a new subsiite for each contract whenever the user creates a new contract. The subsite has a Document library where users can store documents related to the contract. The app stores the WebID of the subsite in the custom back-end database, along with all the metadata associated with the contract.
I have PowerApp that connects to custom back-end database using the On-Prem gateway. It can read all the all the metadata associated with the contract, including the WebID.
I need the PowerApp to fetch and display documents from the On-Prem SharePoint site with the given ID. I could connect directly to the SharePoint Content Database from the PowerApp and get the data that way, but I know this is not supported.
Is there a way to dynamically connect a PowerApp to a site using a WebID?
Do you want to create a connection to your On-prem SP site dynamically within your app?
If you want to create a connection to your On-prem SP site dynamically within your app, I afraid that there is no way to achieve your needs in PowerApps currently.
Creating a connection to a data source dynamically within an app is not supported within PowerApps currently. If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum: