public static void PublishPBIX(Guid WorkspaceId, string PbixFilePath, string ImportName)
 {
     PowerBIClient pbiClient = TokenManager.GetPowerBiClient(requiredScopes);
     FileStream    stream    = new FileStream(PbixFilePath, FileMode.Open, FileAccess.Read);
     var           import    = pbiClient.Imports.PostImportWithFileInGroup(WorkspaceId, stream, ImportName);
 }
        public static void TakeOverDataset(Guid WorkspaceId, string DatasetId)
        {
            PowerBIClient pbiClient = TokenManager.GetPowerBiClient(requiredScopes);

            pbiClient.Datasets.TakeOverInGroup(WorkspaceId, DatasetId);
        }
        public static void RefreshDataset(Guid WorkspaceId, string DatasetId)
        {
            PowerBIClient pbiClient = TokenManager.GetPowerBiAppOnlyClient();

            pbiClient.Datasets.RefreshDatasetInGroup(WorkspaceId, DatasetId);
        }