Template Apps - Create Install Ticket

Generates an installation ticket for the automated install flow of the specified template app.

Permissions

The caller must use service principal for authentication. For more information, see Embed Power BI content with service principal and Considerations and limitations.

Limitations

  • The tenant making this API call must own the specified template app.
  • The template app must either be published to Microsoft AppSource, or, both the ticket creator and the end-user installing with the ticket must have explicit access to the app.
  • All query parameters in the install ticket must be configured.

POST https://api.powerbi.com/v1.0/myorg/CreateTemplateAppInstallTicket

Request Body

Name Type Description
installDetails

TemplateAppInstallDetails[]

List of install details

Responses

Name Type Description
200 OK

InstallTicket

OK

Examples

Create an install ticket for a template app, specifying two query parameters example.

Sample request

POST https://api.powerbi.com/v1.0/myorg/CreateTemplateAppInstallTicket
{
  "appId": "91ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87",
  "packageKey": "g632bb64...OfsoqT56xEM=",
  "ownerTenantId": "d43e3248-3d83-44aa-a94d-c836bd7f9b79",
  "config": {
    "configuration": {
      "param1": "value1",
      "param2": "value2"
    }
  }
}

Sample response

{
  "ticket": "H4sI....AAA=",
  "ticketId": "4b76f5ed-5a06-4150-8d1b-60f8e4c186f4",
  "expiration": "2020-07-29T17:58:19Z"
}
{
  "error": {
    "code": "ServiceAppApplicationOwnershipValidationFailed",
    "pbi.error": {
      "code": "ServiceAppApplicationOwnershipValidationFailed",
      "parameters": {},
      "details": [],
      "exceptionCulprit": 1
    }
  }
}
{
  "error": {
    "code": "ServiceAppInstallTicketInvalidConfiguration",
    "pbi.error": {
      "code": "ServiceAppInstallTicketInvalidConfiguration",
      "parameters": {},
      "details": [],
      "exceptionCulprit": 1
    }
  }
}

Definitions

Name Description
CreateInstallTicketRequest

A request to create a Power BI install ticket

InstallTicket

An automated install ticket for a Power BI template app

TemplateAppConfigurationRequest

An automated install configuration for a Power BI template app (dictionary of name-value pairs)

TemplateAppInstallDetails

The install details for a Power BI template app

CreateInstallTicketRequest

A request to create a Power BI install ticket

Name Type Description
installDetails

TemplateAppInstallDetails[]

List of install details

InstallTicket

An automated install ticket for a Power BI template app

Name Type Description
expiration

string

The expiration date and time (UTC) of the ticket

ticket

string

Install ticket

ticketId

string

The unique ID of an install ticket. Audit logs can be used to correlate operations that use this ticket with the generate ticket operation.

TemplateAppConfigurationRequest

An automated install configuration for a Power BI template app (dictionary of name-value pairs)

Name Type Description
configuration

object

TemplateAppInstallDetails

The install details for a Power BI template app

Name Type Description
appId

string

The unique ID of the Power BI template app

config

TemplateAppConfigurationRequest

The automated install configuration

ownerTenantId

string

The tenant ID of the Power BI template app owner

packageKey

string

The secure key for the Power BI template app version