Embedding Power BI Report into .net core Web api using Azure AD B2C Tenant

Virendra Panpatil 25 Reputation points
2023-02-03T05:57:15.56+00:00

Hello programmars

I am trying to implement .net core Web api which can embed PowerBI reports. I am able to do that using Azure Active Directory but the problem is Our client has Azure AD B2C tenant so how can I generate access token using users of B2C tenant.

In short I want to configure that report embedding part using Azure AD B2C tenant

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,571 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,113 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Manojkumar Maheshwari 0 Reputation points
    2024-10-15T23:02:03.3866667+00:00

    I've implemented a solution that leverages Azure Active Directory (AD) and Azure AD B2C to authenticate users and provide access to Power BI embedded content. Here's a breakdown:

    1. Azure AD Application: I've registered a new application in Azure AD, configuring it to use client credentials.
    2. Service Principal: I've created a service principal associated with this application, allowing it to act on behalf of users.
    3. Access Token: For successfully authenticated B2C users, I've obtained an access token using the service principal.
    4. Embed Token: I've passed this access token to the Power BI SDK or REST APIs to acquire an embed token. This embed token grants permissions to the application to access and render Power BI reports or dashboards.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.