I understand the scenario better now. If users have access to the images but might not be authenticated to SharePoint in the browser, you can try implementing a method within PowerApps to authenticate the users before displaying the images. Here's a possible approach to handle this situation:
Use the SharePoint connector in PowerApps to fetch the images directly from SharePoint without involving a flow.
Wrap the image control in a container (e.g., a group) in PowerApps.
Set the container's Visible property to a condition that checks if the user is authenticated to SharePoint. You can use the Office365Users connector to check the user's status.
For example, you can use the following formula to check if the user is logged in to SharePoint:
Office365Users.MyProfile().DisplayName
If the user is not authenticated, this formula will return blank. You can use this property to set the visibility of the container:
If(
IsBlank(Office365Users.MyProfile().DisplayName),
false, // Not authenticated, hide the container
true // Authenticated, show the container with the image control
)
Add a default image control (or a blank image) within the same container, placed behind the actual image control. This way, when the user is not authenticated, they will see the default image or a blank area.
When the user is authenticated, they will see the actual image control placed above the default image control, effectively hiding the default image.
By following this approach, the users will see the default image or a blank area in the gallery when they are not authenticated to SharePoint. If they try to open the image URL directly in the browser, SharePoint will prompt them to authenticate, and once authenticated, they can see the actual image within the PowerApps gallery.
Keep in mind that this approach doesn't directly force authentication within PowerApps, but it gives you a way to handle the visibility of images based on the user's authentication status. It's essential to properly communicate to users that they need to access the images through the PowerApps app to avoid confusion if they encounter authentication prompts when opening the image URLs directly.