- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update the parameter while using service principal with certificate
Hi,
I'm trying to update the dataset parameters using update parameter api. But i'm unable to do it:
below is the code mockup:
var credentialDetails = new UpdateDatasourceRequest();
var oAuthTokenData = new CredentialData
{
credentialData = new List<Credential>
{
new Credential { Name = "accessToken", Value =GetSQLAccessToken().Result.ToString()}
}
};
credentialDetails.CredentialDetails = new CredentialDetails
{
CredentialType = "OAuth2",
Credentials = JsonConvert.SerializeObject(oAuthTokenData),
EncryptedConnection = "Encrypted",
EncryptionAlgorithm = "None",
PrivacyLevel = "None"
};
var getDatasources = pbiClient.Datasets.GetDatasourcesInGroup(workspaceId, pbiReport.DatasetId);
var refreshRequested = new RefreshRequest
{
NotifyOption = NotifyOption.NoNotification
};
if (getDatasources.Value.Count > 0)
{
pbiClient.Datasets.TakeOver(workspaceId, pbiReport.DatasetId);
await pbiClient.Gateways.UpdateDatasourceAsync((Guid)getDatasources.Value[0].GatewayId, (Guid)getDatasources.Value[0].DatasourceId, credentialDetails);
await pbiClient.Datasets.UpdateParametersInGroupAsync(workspaceId, datasetIds.FirstOrDefault().ToString(), updateRequest);
await pbiClient.Datasets.RefreshDatasetAsync(workspaceId, datasetIds.FirstOrDefault().ToString(), refreshRequested);
}
how ever i'm unable to perform UpdateDatasourceAsync .Why i'm using this is because to refresh the dataset , i need to use this method here i'm facing the issue and it returning the bad request. i'm using the SQL Acces token for the crendentials. Is there any way to update the parameter . please let us know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to take over the dataset for update parameter, but however while taking over dataset credentials for that dataset is getting lost. So is there is any way to take over the dataset without credentials being lost.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, that's how this is designed, and (to me) it makes sense. Prevents unauthorized access and data loss.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
does it work in the sandbox?
Datasets - Update Parameters In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Microsoft Fabric Community Conference 2025
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
Subject | Author | Posted | |
---|---|---|---|
07-25-2024 06:20 AM | |||
06-26-2024 03:02 AM | |||
05-27-2024 08:50 AM | |||
04-10-2024 06:36 AM | |||
07-19-2024 01:41 AM |
User | Count |
---|---|
11 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
9 | |
3 | |
2 | |
2 | |
2 |