/// <summary> /// Generates an embed token for multiple reports, datasets and target /// workspaces. Reports and datasets do not have to be related. The binding of /// a report to a dataset can be done during embedding. Target workspaces are /// workspaces where creation of reports is allowed.<br/>This API is /// relevant only to ['App owns data' embed /// scenario](https://docs.microsoft.com/power-bi/developer/embed-sample-for-customers). /// </summary> /// <remarks> /// <br/>**Required scope**: <ul><li>Content.Create - /// required only if a target workspace is specified in /// [GenerateTokenRequestV2](/rest/api/power-bi/embedtoken/generatetoken#generatetokenrequestv2)</li><li>Report.ReadWrite.All /// or Report.Read.All - required only if a report is specified in /// [GenerateTokenRequestV2](/rest/api/power-bi/embedtoken/generatetoken#generatetokenrequestv2)</li><li>Report.ReadWrite.All /// - required if allowEdit flag is specified for at least one report in /// [GenerateTokenRequestV2](/rest/api/power-bi/embedtoken/generatetoken#generatetokenrequestv2)</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. /// <h2>Restrictions</h2><li>All the reports and datasets /// must reside in workspace V2. All the target workpaces must be workspace /// V2.</li><li>Maximum number of reports, datasets and target /// workspaces is 50 each.</li><li>Generating Embed Token with RLS /// may not work for AS Azure or AS OnPrem live connection reports for several /// minutes after a /// [Rebind](/rest/api/power-bi/reports/RebindReport).</li><br/> /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='requestParameters'> /// Generate token parameters /// </param> public static EmbedToken GenerateToken(this IEmbedTokenOperations operations, GenerateTokenRequestV2 requestParameters) { return(operations.GenerateTokenAsync(requestParameters).GetAwaiter().GetResult()); }