Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Team,
We have a WPF app using Microsoft.PowerBI.Api, which is dependent on Microsoft.Rest.ClientRuntime package, "This package has been deprecated as it is legacy and is no longer maintained." Suggested alternate for Microsoft.Rest.ClientRuntime is Azure.Core 1.34.0. However Microsoft.PowerBI.APi is depending on Microsoft.Rest.ClientRuntime packgae.
Can someone provide the best approach to fix this?
Thanks,
Raghav
Solved! Go to Solution.
HI @RaghavJev,
As the document said the 'Microsoft.Rest.ClientRuntime' package will continue to receive critical bug fixes until September 2023 and you can continuous use these functions until September.
For migrate from 'Microsoft.Rest.ClientRuntime' to 'Azure.core', you can use the Azure.Core.Pipeline.HttpPipeline class instead of Microsoft.Rest.ServiceClient and use the Azure.Core.TokenCredential class instead Microsoft.Rest.ServiceClientCredentials.
For example:
using Azure.Core;
using Azure.Identity;
using Azure.Security.KeyVault.Secrets;
using Microsoft.PowerBI.Api;
using Microsoft.PowerBI.Api.Models;
using System;
// Create a new instance of TokenCredential using DefaultAzureCredential
TokenCredential credential = new DefaultAzureCredential();
// Authenticate with Power BI using TokenCredential
var client = new PowerBIClient(new Uri("https://api.powerbi.com"), credential);
The above code uses DefaultAzureCredential to authenticate with Power BI using Azure Active Directory . You can also use other types of credentials, such as ClientSecretCredential, depending on your authentication requirements .
// create a client
var client = new SecretClient(new Uri("http://example.com"), new DefaultAzureCredential());
Regards,
Xiaoxin Sheng
HI @RaghavJev,
As the document said the 'Microsoft.Rest.ClientRuntime' package will continue to receive critical bug fixes until September 2023 and you can continuous use these functions until September.
For migrate from 'Microsoft.Rest.ClientRuntime' to 'Azure.core', you can use the Azure.Core.Pipeline.HttpPipeline class instead of Microsoft.Rest.ServiceClient and use the Azure.Core.TokenCredential class instead Microsoft.Rest.ServiceClientCredentials.
For example:
using Azure.Core;
using Azure.Identity;
using Azure.Security.KeyVault.Secrets;
using Microsoft.PowerBI.Api;
using Microsoft.PowerBI.Api.Models;
using System;
// Create a new instance of TokenCredential using DefaultAzureCredential
TokenCredential credential = new DefaultAzureCredential();
// Authenticate with Power BI using TokenCredential
var client = new PowerBIClient(new Uri("https://api.powerbi.com"), credential);
The above code uses DefaultAzureCredential to authenticate with Power BI using Azure Active Directory . You can also use other types of credentials, such as ClientSecretCredential, depending on your authentication requirements .
// create a client
var client = new SecretClient(new Uri("http://example.com"), new DefaultAzureCredential());
Regards,
Xiaoxin Sheng