コード例 #1
0
 /// <summary>
 /// Generates an embed token to view the specified tile from the specified
 /// workspace.&lt;br/&gt;This API is relevant only to ['App owns data' embed
 /// scenario](https://docs.microsoft.com/power-bi/developer/embed-sample-for-customers).
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: (all of the below)
 /// &lt;ul&gt;&lt;li&gt;Dashboard.ReadWrite.All or
 /// Dashboard.Read.All&lt;/li&gt;&lt;li&gt;Report.ReadWrite.All or
 /// Report.Read.All &lt;/li&gt;&lt;li&gt;Dataset.ReadWrite.All or
 /// Dataset.Read.All&lt;/li&gt;&lt;/ul&gt;To set the permissions scope, see
 /// [Register an
 /// app](https://docs.microsoft.com/power-bi/developer/register-app).&lt;/br&gt;&lt;/br&gt;When
 /// using service principal for authentication, refer to [Service Principal
 /// with Power
 /// BI](https://docs.microsoft.com/power-bi/developer/embed-service-principal)
 /// document along with considerations and limitations section.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The workspace id
 /// </param>
 /// <param name='dashboardId'>
 /// The dashboard id
 /// </param>
 /// <param name='tileId'>
 /// The tile id
 /// </param>
 /// <param name='requestParameters'>
 /// Generate token parameters
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <EmbedToken> GenerateTokenInGroupAsync(this ITilesOperations operations, System.Guid groupId, System.Guid dashboardId, System.Guid tileId, GenerateTokenRequest requestParameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GenerateTokenInGroupWithHttpMessagesAsync(groupId, dashboardId, tileId, requestParameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
 /// <summary>
 /// Generates an embed token to view the specified tile from the specified
 /// workspace.&lt;br/&gt;This API is relevant only to ['App owns data' embed
 /// scenario](https://docs.microsoft.com/power-bi/developer/embed-sample-for-customers).
 /// </summary>
 /// <remarks>
 /// &lt;br/&gt;**Required scope**: (all of the below)
 /// &lt;ul&gt;&lt;li&gt;Dashboard.ReadWrite.All or
 /// Dashboard.Read.All&lt;/li&gt;&lt;li&gt;Report.ReadWrite.All or
 /// Report.Read.All &lt;/li&gt;&lt;li&gt;Dataset.ReadWrite.All or
 /// Dataset.Read.All&lt;/li&gt;&lt;/ul&gt;To set the permissions scope, see
 /// [Register an
 /// app](https://docs.microsoft.com/power-bi/developer/register-app).&lt;/br&gt;&lt;/br&gt;When
 /// using service principal for authentication, refer to [Service Principal
 /// with Power
 /// BI](https://docs.microsoft.com/power-bi/developer/embed-service-principal)
 /// document along with considerations and limitations section.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupId'>
 /// The workspace id
 /// </param>
 /// <param name='dashboardId'>
 /// The dashboard id
 /// </param>
 /// <param name='tileId'>
 /// The tile id
 /// </param>
 /// <param name='requestParameters'>
 /// Generate token parameters
 /// </param>
 public static EmbedToken GenerateTokenInGroup(this ITilesOperations operations, System.Guid groupId, System.Guid dashboardId, System.Guid tileId, GenerateTokenRequest requestParameters)
 {
     return(operations.GenerateTokenInGroupAsync(groupId, dashboardId, tileId, requestParameters).GetAwaiter().GetResult());
 }