Forum Discussion
How to Schedule and Export PDF Reports with Dynamic Parameters for Multiple Sentinel Workspace IDs
- 1 year ago
Hi noob456 ,
Although the Logic App works correctly at the API level, the Power BI Service is rejecting the dataset refresh due to missing or unsupported credentials for the underlying data source. Since you've already registered a service principal in each tenant, it’s important to ensure that it has the required API permissions, including Dataset.ReadWrite.All, Report.Read.All, and Workspace.Read.All. Additionally, your service principal must have direct access to the data source (for example, SQL or Log Analytics), and the data source itself must be capable of accepting service principal tokens.Make sure admin consent has been granted for the permissions in each Azure Active Directory (AAD) tenant. The service principal should also be added to the appropriate Power BI workspace as either an Admin or Member. Furthermore, confirm that the Power BI tenant setting “Allow service principals to use Power BI APIs” is enabled. This setting can be found in the Power BI Admin Portal under Tenant settings > Developer settings.
It’s also essential to verify that your dataset supports authentication via service principal. To do this, navigate to Power BI Service > Dataset > Settings > Data Source Credentials and check if the data source supports service principal authentication. For instance, services like Azure SQL Database or Azure Data Lake support OAuth2 and can work with service principals, but they must be configured explicitly for this type of authentication.
Finally, ensure that the setting under Datasets in the Power BI Admin Portal “Allow XMLA endpoint and Analyze in Excel with on-premises datasets” – is not configured in a way that blocks service principal access.
Hope this helps,
Best Regards,
Chaithra E.
Thank you very much!! I think we thought the same as I'm already on the step 3, however everytime I attempt to refresh in PowerBI I get a message that I need to reauthenticate, I reauthenticate with the service principal data (tenant id, secret, etc..), I run the logic app again and same thing, this are the steps I doing
1. Recurrence every hour
2. Initialize variables (workspace ID)
3. get Token
4. Dataset TakeOver
5. Update Parameters
Everything works greate up to this point, but then when I attempt to refresh I get the error "It looks like scheduled refresh failed because at least one data source is missing credentials. To start the refresh again, go to this dataset's settings page and enter credentials for all data sources.", no matter what I do, I can re-authenticate manually and refresh manually, it works fine, if I use the logic app, it failed every time.... any thoughts?
Hi noob456 ,
Although the Logic App works correctly at the API level, the Power BI Service is rejecting the dataset refresh due to missing or unsupported credentials for the underlying data source. Since you've already registered a service principal in each tenant, it’s important to ensure that it has the required API permissions, including Dataset.ReadWrite.All, Report.Read.All, and Workspace.Read.All. Additionally, your service principal must have direct access to the data source (for example, SQL or Log Analytics), and the data source itself must be capable of accepting service principal tokens.
Make sure admin consent has been granted for the permissions in each Azure Active Directory (AAD) tenant. The service principal should also be added to the appropriate Power BI workspace as either an Admin or Member. Furthermore, confirm that the Power BI tenant setting “Allow service principals to use Power BI APIs” is enabled. This setting can be found in the Power BI Admin Portal under Tenant settings > Developer settings.
It’s also essential to verify that your dataset supports authentication via service principal. To do this, navigate to Power BI Service > Dataset > Settings > Data Source Credentials and check if the data source supports service principal authentication. For instance, services like Azure SQL Database or Azure Data Lake support OAuth2 and can work with service principals, but they must be configured explicitly for this type of authentication.
Finally, ensure that the setting under Datasets in the Power BI Admin Portal “Allow XMLA endpoint and Analyze in Excel with on-premises datasets” – is not configured in a way that blocks service principal access.
Hope this helps,
Best Regards,
Chaithra E.