Power BI Embedded suspend and resume capacity using NET SDK

0 votes
I'm trying to figure out whether there's a NuGet package for communicating with this part of the API for suspending and resuming my Power BI embedded capability.

I haven't been able to locate it. Is it possible to find what I'm looking for?
Feb 16, 2022 in Power BI by surbhi
• 3,820 points
907 views

1 answer to this question.

0 votes

In short, No. As the link you provided, it need azure_auth to access to Power BI Embedded.

You could use the below code to get the access_token and call the rest api you provide.

private static string redirectUri = "https://login.live.com/oauth20_desktop.srf";
    private static string resourceUri = "https://analysis.windows.net/powerbi/api";
    private static string authorityUri = "https://login.windows.net/common/oauth2/authorize";
    // Obtain at https://dev.powerbi.com/apps
    private static string clientId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";

    private static AuthenticationContext authContext = new AuthenticationContext(authorityUri, new TokenCache());

    private async void btnAuthenticate_ClickAsync(object sender, EventArgs e)
    {
        var authenticationResult = await authContext.AcquireTokenAsync(resourceUri, clientId, new Uri(redirectUri), new PlatformParameters(PromptBehavior.Auto));
        if (authenticationResult == null)
            MessageBox.Show("Call failed.");
        else
            MessageBox.Show(authenticationResult.AccessToken);
    }
answered Feb 16, 2022 by CoolCoder
• 4,420 points

Related Questions In Power BI

+1 vote
1 answer

Is it possible to manage limits while using dedicated capacity power bi embedded app service?

These limits are not related to using ...READ MORE

answered Sep 24, 2018 in Power BI by Hannah
• 18,520 points
705 views
0 votes
1 answer

.Net Core 1.1 : Power BI Embedded

Hope this might be of some help ...READ MORE

answered Dec 27, 2018 in Power BI by Upasana
• 8,620 points
834 views
0 votes
0 answers

How can I optimize Power BI visuals using bookmarks and buttons for interactive storytelling?

How can I optimize Power BI visuals ...READ MORE

6 days ago in Power BI by Evanjalin
• 5,530 points
17 views
0 votes
1 answer

Embed URL-multiple filters in Power BI

With the release of 2.0.0 you can ...READ MORE

answered Oct 16, 2018 in Power BI by Annie97
• 2,160 points
3,857 views
0 votes
1 answer

Passing a parameter to Power BI Embedded via embedded URL

Add the following to the end of ...READ MORE

answered Oct 23, 2018 in Power BI by Annie97
• 2,160 points
4,940 views
0 votes
1 answer

powerbi embeded in .net core 1.1

See if it helps: https://www.nuget.org/packages/PowerBI.NetStandar ...READ MORE

answered Nov 28, 2018 in Power BI by Upasana
• 8,620 points
1,503 views
0 votes
1 answer

Custom title and logo in Power BI Report Server

Your title can always be added to ...READ MORE

answered Feb 9, 2022 in Power BI by CoolCoder
• 4,420 points
1,214 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP