Power BI Embedded 분석을 사용하려면 Azure에서 Azure AD(Azure Active Directory) 애플리케이션을 등록해야 합니다.To use Power BI embedded analytics, you need to register an Azure Active Directory (Azure AD) application in Azure.Azure AD 앱은 Power BI REST 리소스에 대한 사용 권한을 설정하고 Power BI REST API에 대한 액세스를 허용합니다.The Azure AD app establishes permissions for Power BI REST resources, and allows access to the Power BI REST APIs.
포함 솔루션 결정Determine your embedding solution
앱을 등록하기 전에 다음 중 가장 적합한 솔루션을 결정합니다.Before registering your app, decide which of the following solutions is best suited for you:
고객에 대한 콘텐츠 포함Embed for your customers
조직에 대한 콘텐츠 포함Embed for your organization
고객에 대한 콘텐츠 포함Embed for your customers
고객을 위해 설계된 애플리케이션을 만들 계획인 경우 ‘앱 소유 데이터’라고도 하는 고객에 대한 콘텐츠 포함 솔루션을 사용합니다.Use the embed for your customers solution, also known as app owns data, if you're planning to create an application that's designed for your customers.사용자는 애플리케이션을 사용하기 위해 Power BI에 로그인하거나 Power BI 라이선스를 가질 필요가 없습니다.Users will not need to sign in to Power BI or have a Power BI license, to use your application.애플리케이션은 다음 방법 중 하나를 사용하여 Power BI에 대해 인증합니다.Your application will use one of the following methods to authenticate against Power BI:
마스터 사용자 계정(Power BI에 로그인하는 데 사용되는 Power BI Pro 라이선스)Master user account (a Power BI Pro license used for signing in to Power BI)
고객에 대한 콘텐츠 포함 솔루션은 일반적으로 타사를 위한 애플리케이션을 만드는 ISV(독립 소프트웨어 공급업체) 및 개발자에 의해 사용됩니다.The embed for your customers solution is usually used by independent software vendors (ISVs) and developers who are creating applications for a third party.
조직에 대한 콘텐츠 포함Embed for your organization
사용자가 Power BI에 대한 인증을 위해 자격 증명을 사용해야 하는 애플리케이션을 만들 계획인 경우 ‘사용자 소유 데이터’라고도 하는 솔루션에 조직에 대한 콘텐츠 포함을 사용합니다.Use the embed for your organization solution, also known as user owns data, if you're planning to create an application that requires users to use their credentials to authenticate against Power BI.
조직 솔루션에 대한 포함은 일반적으로 기업 및 대규모 조직에서 사용되며 내부 사용자를 위한 것입니다.The embed for your organization solution is usually used by enterprises and big organizations, and is intended for internal users.
Azure AD 앱 등록Register an Azure AD app
Azure AD 앱을 등록하는 가장 쉬운 방법은 Power BI 포함 설정 도구를 사용하는 것입니다.The easiest way to register an Azure AD app, is by using the Power BI embedding setup tool.이 도구는 간단한 그래픽 인터페이스를 사용하여 두 포함 솔루션을 위한 빠른 등록 프로세스를 제공합니다.The tool offers a quick registration process for both embedding solutions, using a simple graphical interface.
조직에 대한 콘텐츠 포함 애플리케이션을 만드는 경우 Azure AD 앱에 대한 추가 제어를 원하면 Azure Portal에서 수동으로 등록할 수 있습니다.If you're creating an embed for your organization application, and want more control over your Azure AD app, you can register it manually in the Azure portal.
다음 단계에서는 Power BI 고객에 대한 콘텐츠 포함 솔루션을 위해 Azure AD 애플리케이션을 등록하는 방법을 설명합니다.These steps describe how to register an Azure AD application for the Power BI embed for your customers solution.
‘Choose an embedding solution’(포함 솔루션 선택) 섹션에서 고객에 대한 콘텐츠 포함 을 선택합니다.In the Choose an embedding solution section, select Embed for your customers.
‘1단계 - Power BI에 로그인’에서 Power BI 테넌트에 속한 사용자로 로그인합니다.In Step 1 - sign in to Power BI, sign in with a user that belongs to your Power BI tenant.Azure AD 앱이 이 사용자로 등록됩니다.The Azure AD app will be registered under this user.
이미 로그인한 경우 Azure AD 앱을 만드는 데 사용하려는 사용자로 로그인했는지 확인합니다.If you're already signed in, verify that you're signed in with the user you want to use for creating the Azure AD app.사용자를 변경하려면 ‘로그아웃’ 링크를 선택하고 도구가 다시 시작되면 다시 로그인합니다.To change a user, select the sign out link and once the tool restarts, sign in again.
‘2단계 - 애플리케이션 등록’에서 다음 필드를 입력합니다.In Step 2 - Register your application, fill in the following fields:
애플리케이션 이름 - 애플리케이션에 이름을 지정합니다.Application Name - Give your application a name.
API 액세스 - 애플리케이션에 필요한 Power BI API(범위라고도 함)를 선택합니다.API access - Select the Power BI APIs (also known as scopes) that your application needs.모두 선택 을 사용하여 모든 API를 선택할 수 있습니다.You can use Select all to select all the APIs.Power BI 액세스 권한에 대한 자세한 내용은 Microsoft ID 플랫폼 엔드포인트의 권한 및 동의를 참조하세요.For more information about Power BI access permissions, see Permissions and consent in the Microsoft identity platform endpoint.
등록 을 선택합니다.Select Register.
Azure AD 앱의 애플리케이션 ID 가 요약 상자에 표시됩니다.Your Azure AD app Application ID is displayed in the Summary box.나중에 사용하도록 이 값을 복사합니다.Copy this value for later use.
(선택 사항) ‘3단계 - 작업 영역 만들기’에서 Power BI 서비스 작업 영역을 만들 수 있습니다.(Optional) In Step 3 - Create a workspace, you can create a workspace in Power BI service.
이미 Power BI 작업 영역이 있는 경우 건너뛰기 를 선택합니다.If you already have a Power BI workspace, select Skip.
작업 영역을 만들려면 작업 영역의 이름을 입력하고 작업 영역 만들기 를 선택합니다.To create a workspace, enter a name for your workspace and select Create workspace.작업 영역 이름 및 ID가 ‘요약’ 상자에 나타납니다.Your Workspace name and ID appear in the Summary box.나중에 사용하도록 이 값을 복사합니다.Copy these values for later use.
참고
임베디드 분석 샘플 앱 이 예상대로 작동하려면 도구를 사용하여 작업 영역을 만들어야 합니다.For the embedded analytics sample app to work as expected, you have to create a workspace using the tool.
(선택 사항) ‘4단계 - 콘텐츠 가져오기’에서 다음 옵션 중 하나를 선택합니다.(Optional) In Step 4 - Import content, select one of following options:
고유의 Power BI 앱이 있는 경우 건너뛰기 를 선택할 수 있습니다.If you have your own Power BI app, you can select Skip.
샘플 보고서를 사용하는 샘플 Power BI 앱을 만들려면 Sample Power BI report(샘플 Power BI 보고서)를 선택한 다음 가져오기 를 선택합니다.If you want to create a sample Power BI app using a sample report, select Sample Power BI report and then select Import.
고유한 보고서를 사용하는 샘플 Power BI 앱을 만들려면 .pbix 파일 업로드 를 선택하고 고유 파일을 검색한 후 가져오기 를 선택합니다.If you want to create a sample Power BI app using your own report, select Upload a .pbix file, browse for your file and then select Import.
5 단계 - 사용 권한 부여 에서 ‘사용 권한 부여’ 를 선택하고 팝업 창에서 수락 을 선택합니다.In Step 5 - Grant permissions, select Grant permissions and in the pop-up window select accept.이렇게 하면 선택한 API(범위라고도 함)에 Azure AD 앱에서 로그인한 사용자로 액세스할 수 있습니다.This allows your Azure AD app to access the APIs you selected (also known as scopes) with your signed in user.이 사용자는 마스터 사용자 라고도 합니다.This user is also known as the master user.
(선택 사항) 도구를 사용하여 Power BI 작업 영역을 만들고 콘텐츠를 업로드한 경우 이제 애플리케이션 예제 다운로드 를 선택할 수 있습니다.(Optional) If you created a Power BI workspace and uploaded content to it using the tool, you can now select Download sample application.‘요약’ 상자의 모든 정보를 복사해야 합니다.Make sure you copy all the information in the Summary Box.
참고
선택적 단계를 건너뛴 경우에도 샘플 Power BI 앱을 다운로드할 수 있습니다.If you skipped the optional stages, you can still download a sample Power BI app.그러나 다운로드한 앱의 코드에는 등록하는 동안 입력하지 않은 속성이 없습니다.However, the code in the downloaded app, will lack the properties that you didn't fill in during registration.예를 들어 작업 영역을 만들지 않은 경우 샘플 앱에는 ‘작업 영역 ID’가 포함되지 않습니다.For example, if you didn't create a workspace, the sample app will not include the workspace ID.
다음 단계에서는 Power BI 조직에 대한 콘텐츠 포함 솔루션을 위해 Azure AD 애플리케이션을 등록하는 방법을 설명합니다.These steps describe how to register an Azure AD application for the Power BI embed for your organization solution.
‘Choose an embedding solution’(포함 솔루션 선택) 섹션에서 조직에 대한 콘텐츠 포함 을 선택합니다.In the Choose an embedding solution section, select Embed for your organization.
‘1단계 - Power BI에 로그인’에서 Power BI 테넌트에 속한 사용자로 로그인합니다.In Step 1 - sign in to Power BI, sign in with a user that belongs to your Power BI tenant.Azure AD 앱이 이 사용자로 등록됩니다.The Azure AD app will be registered under this user.
이미 로그인한 경우 Azure AD 앱을 만드는 데 사용하려는 사용자로 로그인했는지 확인합니다.If you're already signed in, verify that you're signed in with the user you want to use for creating the Azure AD app.사용자를 변경하려면 ‘로그아웃’ 링크를 선택하고 도구가 다시 시작되면 다시 로그인합니다.To change a user, select the sign out link and once the tool restarts, sign in again.
‘2단계 - 애플리케이션 등록’에서 다음 필드를 입력합니다.In Step 2 - Register your application, fill in the following fields:
애플리케이션 이름 - 애플리케이션에 이름을 지정합니다.Application Name - Give your application a name.
홈페이지 URL - 홈페이지의 URL을 입력합니다.Home Page URL - Enter a URL for your home page.
리디렉션 URL - 애플리케이션 사용자는 로그인하면 애플리케이션이 Azure에서 인증 코드를 수신하는 동안 이 주소로 리디렉션됩니다.Redirect URL - Upon singing in, your application users will be redirected to this address while your application receives an authentication code from Azure.다음 옵션 중 하나를 선택합니다.Select one of these options:
Use a default URL(기본 URL 사용) - 이 옵션은 샘플 임베디드 분석 애플리케이션을 자동으로 만들고 다운로드합니다.Use a default URL - This option will automatically create and download a sample embedded analytics application.기본 URL은 http://localhost:13526/ 입니다.The default URL is http://localhost:13526/.
Use a custom URL(사용자 지정 URL 사용) - 임베디드 분석 애플리케이션이 이미 있고 리디렉션 URL로 사용할 항목을 알고 있는 경우 이 옵션을 선택합니다.Use a custom URL - Select this option if you already have an embedded analytics application, and know what you want to use as a redirect URL.
API 액세스 - 애플리케이션에 필요한 Power BI API(범위라고도 함)를 선택합니다.API access - Select the Power BI APIs (also known as scopes) that your application needs.모두 선택 을 사용하여 모든 API를 선택할 수 있습니다.You can use Select all to select all the APIs.Power BI 액세스 권한에 대한 자세한 내용은 Microsoft ID 플랫폼 엔드포인트의 권한 및 동의를 참조하세요.For more information about Power BI access permissions, see Permissions and consent in the Microsoft identity platform endpoint.
등록 을 선택합니다.Select Register.
Azure AD 앱의 애플리케이션 ID 및 애플리케이션 비밀 값이 요약 상자에 표시됩니다.Your Azure AD app Application ID and Application secret values are displayed in the Summary box.나중에 사용하도록 이 값을 복사합니다.Copy these values for later use.
(선택 사항) ‘3단계 - 작업 영역 만들기’에서 Power BI 서비스 작업 영역을 만들 수 있습니다.(Optional) In Step 3 - Create a workspace, you can create a workspace in Power BI service.
이미 Power BI 작업 영역이 있는 경우 건너뛰기 를 선택합니다.If you already have a Power BI workspace, select Skip.
작업 영역을 만들려면 작업 영역의 이름을 입력하고 작업 영역 만들기 를 선택합니다.To create a workspace, enter a name for your workspace and select Create workspace.작업 영역 이름 및 ID가 ‘요약’ 상자에 나타납니다.Your Workspace name and ID appear in the Summary box.나중에 사용하도록 이 값을 복사합니다.Copy these values for later use.
참고
임베디드 분석 샘플 앱 이 예상대로 작동하려면 도구를 사용하여 작업 영역을 만들어야 합니다.For the embedded analytics sample app to work as expected, you have to create a workspace using the tool.
(선택 사항) ‘4단계 - 콘텐츠 가져오기’에서 다음 옵션 중 하나를 선택합니다.(Optional) In Step 4 - Import content, select one of following options:
고유의 Power BI 앱이 있는 경우 건너뛰기 를 선택할 수 있습니다.If you have your own Power BI app, you can select Skip.
샘플 보고서를 사용하는 샘플 Power BI 앱을 만들려면 Sample Power BI report(샘플 Power BI 보고서)를 선택한 다음 가져오기 를 선택합니다.If you want to create a sample Power BI app using a sample report, select Sample Power BI report and then select Import.
고유한 보고서를 사용하는 샘플 Power BI 앱을 만들려면 .pbix 파일 업로드 를 선택하고 고유 파일을 검색한 후 가져오기 를 선택합니다.If you want to create a sample Power BI app using your own report, select Upload a .pbix file, browse for your file and then select Import.
(선택 사항) 도구를 사용하여 Power BI 작업 영역을 만들고 콘텐츠를 업로드한 경우 이제 애플리케이션 예제 다운로드 를 선택할 수 있습니다.(Optional) If you created a Power BI workspace and uploaded content to it using the tool, you can now select Download sample application.‘요약’ 상자의 모든 정보를 복사해야 합니다.Make sure you copy all the information in the Summary Box.
참고
선택적 단계를 건너뛴 경우에도 샘플 Power BI 앱을 다운로드할 수 있습니다.If you skipped the optional stages, you can still download a sample Power BI app.그러나 다운로드한 앱의 코드에는 등록하는 동안 입력하지 않은 속성이 없습니다.However, the code in the downloaded app, will lack the properties that you didn't fill in during registration.예를 들어 작업 영역을 만들지 않은 경우 샘플 앱에는 ‘작업 영역 ID’가 포함되지 않습니다.For example, if you didn't create a workspace, the sample app will not include the workspace ID.
다음 솔루션 중 하나를 만드는 경우에만 Azure AD 수동 앱 등록을 사용합니다.Use the Azure AD manual app registration only if you're creating one of the following solutions:
‘조직에 대한 콘텐츠 포함’ 애플리케이션.An embed for your organization application.
‘서비스 주체’가 있는 ‘고객에 대한 콘텐츠 포함’ 애플리케이션. An embed for your customers application with a service principal.
참고
이 옵션을 선택하는 경우 Azure AD 앱을 등록한 후에 앱에 Power BI 권한을 추가해야 합니다.If you choose this option, after you register your Azure AD app you'll have to add Power BI permissions to it.
페이지의 오른쪽 위에서 사용자 계정을 선택하여 Azure AD 테넌트를 선택합니다.Select your Azure AD tenant by selecting your account in the upper right corner of the page.
앱 등록 을 선택합니다.Select App registrations.이 옵션이 표시되지 않는 경우 검색합니다.If you can't see this option, search for it.
앱 등록 에서 새 등록 을 선택합니다.In App registrations, select New registration.
다음 필드를 작성합니다.Fill in the following fields:
이름 - 애플리케이션에 이름을 지정합니다.Name - Give your application a name.
지원되는 계정 유형 - 애플리케이션을 사용할 수 있는 사용자를 선택합니다.Supported account type - Select who can use the application.
(선택 사항) 리디렉션 URI 에서 리디렉션 URL을 추가합니다.(Optional) In the Redirect URI, add a redirect URL.
등록 을 선택합니다.Select Register.앱이 등록되면 앱의 개요 페이지로 리디렉션됩니다. 여기서 애플리케이션 ID 를 가져올 수 있습니다.After your app is registered you're directed to your app's overview page, where you can obtain the Application ID.
Azure AD 앱의 사용 권한 변경Change your Azure AD app's permissions
애플리케이션을 등록한 후에는 해당 사용 권한을 변경할 수 있습니다.After you register your application, you can make changes to its permissions.프로그래밍 방식으로 또는 Azure Portal에서 사용 권한을 변경할 수 있습니다.Permission changes can be made programmatically, or in the Azure portal.
참고
Azure AD 앱 권한은 ‘마스터 사용자’ 인증 방법을 사용하여 ‘고객에 대한 콘텐츠 포함’ 솔루션에만 적용할 수 있습니다. Azure AD app permissions are only applicable for the embed for your customers solution with the master user authentication method.
페이지의 오른쪽 위에서 사용자 계정을 선택하여 Azure AD 테넌트를 선택합니다.Select your Azure AD tenant by selecting your account in the upper right corner of the page.
앱 등록 을 선택합니다.Select App registrations.이 옵션이 표시되지 않는 경우 검색합니다.If you can't see this option, search for it.
소유한 애플리케이션 탭에서 앱을 선택합니다.From the Owned applications tab, select your app.애플리케이션은 ‘개요’ 탭에서 열리며, 여기서 ‘애플리케이션 ID’를 검토할 수 있습니다. The application opens in the Overview tab, where you can review the Application ID.
API 사용 권한 탭을 선택합니다.Select the API permissions tab.
사용 권한을 추가하려면 다음 단계를 수행합니다.To add permissions, follow these steps:
사용 권한 추가 를 선택한 다음 Power BI 서비스 를 선택합니다.Select Add a permission and then select Power BI service.
위임된 권한 을 선택하고 필요한 특정 권한을 추가 또는 제거합니다.Select Delegated Permissions and add or remove the specific permissions you need.
완료되면 사용 권한 추가 를 선택하여 변경 내용을 저장합니다.When you're done, select Add permissions to save your changes.
사용 권한을 제거하려면 다음 단계를 수행합니다.To remove a permission, follow these steps:
사용 권한 오른쪽에 있는 줄임표(...)를 선택합니다.Select the ellipsis (...) to the right of the permission.
권한 제거 를 선택합니다.Select Remove permission.
‘권한 제거’ 팝업 창에서 예, 제거합니다 를 선택합니다.In the Remove permission pop-up window, select Yes, remove.
프로그래밍 방식으로 Azure AD 앱 사용 권한을 변경하려면 테넌트 내에서 기존 서비스 주체(사용자)를 가져와야 합니다.To change your Azure AD app permissions programmatically, you'll need to get the existing service principals (users) within your tenant.이 작업을 수행하는 방법에 대한 자세한 내용은 servicePrincipal을 참조하세요.For information on how to do that, see servicePrincipal.
테넌트 내에서 모든 서비스 주체를 가져오려면 {ID} 없이 Get servicePrincipal API를 호출합니다.To get all the service principals within your tenant, call the Get servicePrincipal API without {ID}.
appId 속성으로 앱 ‘애플리케이션 ID’가 있는 서비스 주체를 확인합니다.Check for a service principal with your app's application ID as the appId property.
consentType에 다음 값 중 하나를 할당하여 앱에 대한 Power BI 사용 권한을 부여합니다.Grant Power BI permissions to your app, by assigning one of these values to consentType:
AllPrincipals - Power BI 관리자가 테넌트의 모든 사용자를 대신하여 권한을 부여하는 데만 사용할 수 있습니다.AllPrincipals - Can only be used by a Power BI admin to grant permissions on behalf of all the users in the tenant.
Principal - 특정 사용자를 대신하여 권한을 부여하는 데 사용됩니다.Principal - Use to grant permissions on behalf of a specific user.이 옵션을 사용하는 경우 principalId={User_ObjectId} 속성을 요청 본문에 추가합니다.If you're using this option, add the principalId={User_ObjectId} property to the request body.
마스터 사용자 를 사용하는 경우 Azure AD에서 동의 여부를 묻는 메시지가 표시되지 않게 하려면 마스터 계정에 대한 사용 권한을 부여해야 합니다.If you're using a master user, to avoid being prompted for consent by Azure AD, you need to grant permissions to the master account.
resourceIdc78a3685-1ce7-52cd-95f7-dc5aea8ec98e 는 전역적이지 않고 테넌트 종속입니다.The resourceIdc78a3685-1ce7-52cd-95f7-dc5aea8ec98e is tenant dependent and not universal.이 값은 Azure AD에서 ‘Power BI 서비스’ 애플리케이션의 objectId 입니다.This value is the objectId of the Power BI Service application in Azure AD.Azure Portal에서 이 값을 얻으려면 엔터프라이즈 애플리케이션 > 모든 애플리케이션으로 이동하여 ‘Power BI 서비스’를 검색합니다.To get this value from the Azure portal, navigate to Enterprise applications > All applications, and search for Power BI Service.
consentType에 값을 할당하여 Azure AD에 앱 사용 권한을 부여합니다.Grant app permissions to Azure AD, by assigning a value to consentType.
C#을 사용하여 Azure AD 앱 사용 권한을 변경할 수도 있습니다.You can also change your Azure AD app permissions using C#.자세한 내용은 oAuth2PermissionGrant API를 참조하세요.For more information see the oAuth2PermissionGrant API.이 방법은 일부 프로세스를 자동화하려는 경우에 유용할 수 있습니다.This method can be useful if you're considering to automate some of your processes.
HTTP 요청에 대한 자세한 내용은 HTTP 탭을 참조하세요.For more information regarding the HTTP requests, refer to the HTTP tab.
var graphClient = GetGraphClient();
currentState.createdApp = await graphClient.Applications
.Request()
.AddAsync(application);
System.Threading.Thread.Sleep(2000);
var passwordCredential = new PasswordCredential
{
DisplayName = "Client Secret Created in C#"
};
currentState.createdSecret = await graphClient.Applications[currentState.createdApp.Id]
.AddPassword(passwordCredential)
.Request()
.PostAsync();
var servicePrincipal = new ServicePrincipal
{
AppId = currentState.createdApp.AppId
};
currentState.createdServicePrincipal = await graphClient.ServicePrincipals
.Request()
.AddAsync(servicePrincipal);
GraphServiceClient graphClient = new GraphServiceClient(authProvider);
// Use oAuth2PermissionGrant to change permissions
var oAuth2PermissionGrant = await graphClient.Oauth2PermissionGrants["{id}"]
.Request()
.GetAsync();