Thanks for your detailed explanation — you're working with a fairly advanced integration scenario, and the behavior you're seeing is likely tied to how authentication tokens are handled when AllowNewAPI is enabled in Power Apps.
What's Likely Happening
When you enable AllowNewAPI, Power Apps uses a newer rendering and API model that may:
- Bypass or alter the default token caching behavior, especially for embedded Power BI content.
- Trigger stricter authentication flows, particularly for paginated reports, which use different APIs and may require additional scopes or token refreshes.
This can result in repeated sign-in prompts, even if the user is already authenticated in the app.
Potential Solutions
Here are a few things you can try to bypass or mitigate the sign-in prompt:
1. Use Azure AD SSO with Proper Scopes
Ensure your Power Apps and Power BI are both registered in Azure AD and configured to use Single Sign-On (SSO). Also:
- Confirm that the app registration includes delegated permissions for:
Power BI Service
Report.Read.All
Dataset.Read.All
PaginatedReport.Read.All (if available)
2. Embed Using Service Principal or Embed Token
If you're embedding the Power BI report using a Power BI visual in Power Apps, consider switching to service principal-based embedding or embed tokens with the correct scopes. This avoids relying on user session cookies.
3. Avoid AllowNewAPI if Not Strictly Necessary
If the paginated report can be rendered without AllowNewAPI, try disabling it and see if the sign-in prompt disappears. This is a good test to confirm the root cause.
4. Use a Custom Connector or Power Automate for Paginated Reports
Instead of embedding the paginated report directly, you could:
- Use a Power Automate flow to generate and retrieve the report.
- Display it in Power Apps using a PDF viewer or download link.
5. Browser Settings
Ensure that:
- Third-party cookies are allowed.
- You're not using incognito/private mode.
- The domain hosting Power Apps is trusted in your browser.
🏷️ Tag me if you have any further questions or if the issue persists.
✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.
❤️ Give it a Like if you found the approach useful in any way.