Forum Discussion
Power App writeback to Sql server doesn't work from the service
- 1 year ago
Hi WilliamA
Welcome to the Microsoft Fabric Community.
Below are the steps to navigate to cross verify the sql configuration.
1. How to verify SQL Connection in Power BI Service:-> Access the Data Gateway Configuration:
- Log in to Power BI Service: Navigate to Power BI.
- Go to Settings:
- Click on your profile icon in the top-right corner.
- Select Settings.
- Choose Gateway Settings:
- In the left panel, select Manage gateways under the Admin portal section.
-> Review Gateway Configurations
- Locate the gateway associated with your SQL Server data source.
- Check the Name of the gateway from your Power BI dataset settings or workspace settings.
- Expand the gateway, and you will see the Data Sources configured under it.
->Check SQL Data Source Settings
- Click on the SQL Server data source to view its configuration.
- Verify the following settings:
- Data Source Name: Ensure the name matches the expected SQL Server data source.
- Server and Database: Confirm the correct SQL Server instance and database are specified.
- Authentication Method:
- Windows Authentication: User domain credentials.
- SQL Authentication: Uses a username and password stored in the gateway configuration.
- Credentials: If SQL Authentication is used, ensure the correct username and password are configured.
Step 1.4: Test Connection
- Click Test Connection to verify if the gateway can successfully connect to the SQL Server.
- If the connection fails, recheck the server details, database name, and credentials.
2. Verify SQL Connection in Power BI Embedded:
-> Access Power BI Embedded Configuration
- Log in to the Azure Portal: Navigate to Azure Portal.
- Locate the Azure Power BI Embedded Capacity:
- Search for "Power BI Embedded" in the search bar.
- Select your capacity resource.
-> Check Embedded Application Settings
- Go to the App Owns Data configuration or the code that embeds Power BI.
- Review the connection string or credentials passed from your app to the embedded report:
- Look for any hardcoded SQL credentials in your application code.
- 4.Check if the app uses a Service Principal or a user account.
If the above information helps you, please give us a Kudos and marked the reply as a solution.Thanks,
Cheri Srikanth
Hi WilliamA
I think the error is likely due to a permissions issue. When embedded in Power BI, the app may use different credentials lacking SQL database writeback rights.
- Ensure the Power BI user or service principal has EXECUTE and INSERT permissions on the SQL database.
- Verify the SQL connection in Power Apps.
- Check gateway permissions if using an on-premises gateway.
- Review any Data Loss Prevention (DLP) policies.
These should resolve the issue.
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
- WilliamA1 year ago
Helper I
Thanks Poojarai, I am using power BI embedded "app owns data". is there a way to tell which credientials are being used? the power app sql connection is connected via an on-prem gateway and the sql account used in the power BI report has access to the database.
regarding the gateway - where are these permissions? I couldn't locate anything on the gateway around permissions.