Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
RaghavJev
New Member

Microsoft.PowerBI.Api, dependent on deprecated package Microsoft.Rest.ClientRuntime.

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

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.