/// <summary> /// Generates an embed token to view the specified dashboard from the specified /// workspace.<br/><br/>This API is relevant only to the ['App owns /// data' embed /// scenario](https://docs.microsoft.com/power-bi/developer/embed-sample-for-customers). /// For more information about using this API, see [Considerations when /// generating an embed /// token](https://docs.microsoft.com/power-bi/developer/embedded/generate-embed-token). /// </summary> /// <remarks> /// <br/>**Required scope**: (all of the below) /// <ul><li>Dashboard.ReadWrite.All or /// Dashboard.Read.All</li><li>Report.ReadWrite.All or /// Report.Read.All </li><li>Dataset.ReadWrite.All or /// Dataset.Read.All</li></ul>To set the permissions scope, see /// [Register an /// app](https://docs.microsoft.com/power-bi/developer/register-app).</br></br>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='requestParameters'> /// Generate token parameters /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <EmbedToken> GenerateTokenInGroupAsync(this IDashboardsOperations operations, System.Guid groupId, System.Guid dashboardId, GenerateTokenRequest requestParameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GenerateTokenInGroupWithHttpMessagesAsync(groupId, dashboardId, requestParameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }