diff --git a/.pipelines/pipeline.user.windows.official.yml b/.pipelines/pipeline.user.windows.official.yml
index e8e7e739..bbdae973 100644
--- a/.pipelines/pipeline.user.windows.official.yml
+++ b/.pipelines/pipeline.user.windows.official.yml
@@ -1,7 +1,7 @@
version:
name: 'sdk version'
major: 4
- minor: 0
+ minor: 1
system: 'Buildrevision'
exclude_commit: true
assembly_version: 'majorminoronly'
diff --git a/scripts/pack-sdk.cmd b/scripts/pack-sdk.cmd
index c89cf1c3..93cebd14 100644
--- a/scripts/pack-sdk.cmd
+++ b/scripts/pack-sdk.cmd
@@ -6,7 +6,7 @@ call .\init-dev-cmd.cmd
REM Set Major and Minor package version
SET MAJOR=%CDP_MAJOR_NUMBER_ONLY%
SET MINOR=%CDP_MINOR_NUMBER_ONLY%
-SET PATCH=1
+SET PATCH=0
if "%MAJOR%"=="" SET MAJOR=0
if "%MINOR%"=="" SET MINOR=0
diff --git a/sdk/PowerBI.Api/Extensions/DatasetsOperationsExtensions.cs b/sdk/PowerBI.Api/Extensions/DatasetsOperationsExtensions.cs
index 628b44fe..445da27b 100644
--- a/sdk/PowerBI.Api/Extensions/DatasetsOperationsExtensions.cs
+++ b/sdk/PowerBI.Api/Extensions/DatasetsOperationsExtensions.cs
@@ -632,6 +632,51 @@ public static Datasources GetDatasources(this IDatasetsOperations operations, Gu
}
}
+ ///
+ /// Grants the specified user the specified permissions to the specified dataset
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The group id
+ ///
+ ///
+ /// The dataset id
+ ///
+ ///
+ ///
+ /// Details of user access right
+ ///
+ public static void PostDatasetUser(this IDatasetsOperations operations, Guid groupId, string datasetId, DatasetUserAccess accessRight)
+ {
+ operations.PostDatasetUserAsync(groupId, datasetId, accessRight).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Grants the specified user the specified permissions to the specified dataset
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The group id
+ ///
+ ///
+ /// The dataset id
+ ///
+ ///
+ ///
+ /// Details of user access right
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task PostDatasetUserAsync(this IDatasetsOperations operations, Guid groupId, string datasetId, DatasetUserAccess accessRight, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.PostDatasetUserInGroupWithHttpMessagesAsync(groupId, datasetId, accessRight, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Updates the dataset datasources using the specified datasource selectors
///
diff --git a/sdk/PowerBI.Api/Source/DatasetsOperations.cs b/sdk/PowerBI.Api/Source/DatasetsOperations.cs
index 16eb9fda..7f569721 100644
--- a/sdk/PowerBI.Api/Source/DatasetsOperations.cs
+++ b/sdk/PowerBI.Api/Source/DatasetsOperations.cs
@@ -3755,6 +3755,339 @@ public DatasetsOperations(PowerBIClient client)
return _result;
}
+ ///
+ /// Grants the specified user the specified permissions to the specified
+ /// dataset.
+ ///
+ ///
+ ///
+ /// When user permissions to a dataset have been recently updated, the new
+ /// permissions might not be immediately available through API calls. To
+ /// refresh user permissions, use the [Refresh User
+ /// Permissions](/rest/api/power-bi/users/refresh-user-permissions) API call.
+ ///
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ /// ## Limitations
+ ///
+ /// - Only datasets in a [new workspace
+ /// experience](/power-bi/collaborate-share/service-new-workspaces) workspace,
+ /// that is to say a V2 workspace, are supported.
+ /// - This API only supports adding permissions to principals who don't have
+ /// permissions to the dataset. It cannot be used to change existing dataset
+ /// permissions.
+ /// - Adding permissions to service principals (app principalType) is not
+ /// supported
+ ///
+ /// ######
+ ///
+ ///
+ ///
+ /// The workspace ID
+ ///
+ ///
+ /// The dataset ID
+ ///
+ ///
+ /// Details of user access right
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task PostDatasetUserInGroupWithHttpMessagesAsync(System.Guid groupId, string datasetId, DatasetUserAccess accessRight, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (datasetId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "datasetId");
+ }
+ if (accessRight == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "accessRight");
+ }
+ if (accessRight != null)
+ {
+ accessRight.Validate();
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("groupId", groupId);
+ tracingParameters.Add("datasetId", datasetId);
+ tracingParameters.Add("accessRight", accessRight);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "PostDatasetUserInGroup", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/groups/{groupId}/datasets/{datasetId}/users").ToString();
+ _url = _url.Replace("{groupId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(groupId, Client.SerializationSettings).Trim('"')));
+ _url = _url.Replace("{datasetId}", System.Uri.EscapeDataString(datasetId));
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(accessRight != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(accessRight, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ if (_httpResponse.Content != null) {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ }
+ else {
+ _responseContent = string.Empty;
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new HttpOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Grants the specified user the specified permissions to the specified
+ /// dataset from **My workspace**.
+ ///
+ ///
+ ///
+ /// When user permissions to a dataset have been recently updated, the new
+ /// permissions might not be immediately available through API calls. To
+ /// refresh user permissions, use the [Refresh User
+ /// Permissions](/rest/api/power-bi/users/refresh-user-permissions) API call.
+ ///
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ /// ## Limitations
+ ///
+ /// - Only datasets in a [new workspace
+ /// experience](/power-bi/collaborate-share/service-new-workspaces) workspace,
+ /// that is to say a V2 workspace, are supported.
+ /// - This API only supports adding permissions to principals who don't have
+ /// permissions to the dataset. It cannot be used to change existing dataset
+ /// permissions.
+ /// - Adding permissions to service principals (app principalType) is not
+ /// supported
+ ///
+ /// ######
+ ///
+ ///
+ ///
+ /// The dataset ID
+ ///
+ ///
+ /// Details of user access right
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task PostDatasetUserWithHttpMessagesAsync(string datasetId, DatasetUserAccess accessRight, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (datasetId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "datasetId");
+ }
+ if (accessRight == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "accessRight");
+ }
+ if (accessRight != null)
+ {
+ accessRight.Validate();
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("datasetId", datasetId);
+ tracingParameters.Add("accessRight", accessRight);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "PostDatasetUser", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/datasets/{datasetId}/users").ToString();
+ _url = _url.Replace("{datasetId}", System.Uri.EscapeDataString(datasetId));
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(accessRight != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(accessRight, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200)
+ {
+ var ex = new HttpOperationException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ if (_httpResponse.Content != null) {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ }
+ else {
+ _responseContent = string.Empty;
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new HttpOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// Returns a list of datasets from the specified workspace.
///
diff --git a/sdk/PowerBI.Api/Source/DatasetsOperationsExtensions.cs b/sdk/PowerBI.Api/Source/DatasetsOperationsExtensions.cs
index ca845aca..8f46742f 100644
--- a/sdk/PowerBI.Api/Source/DatasetsOperationsExtensions.cs
+++ b/sdk/PowerBI.Api/Source/DatasetsOperationsExtensions.cs
@@ -1737,6 +1737,190 @@ public static Gateways DiscoverGateways(this IDatasetsOperations operations, str
}
}
+ ///
+ /// Grants the specified user the specified permissions to the specified
+ /// dataset.
+ ///
+ ///
+ ///
+ /// When user permissions to a dataset have been recently updated, the new
+ /// permissions might not be immediately available through API calls. To
+ /// refresh user permissions, use the [Refresh User
+ /// Permissions](/rest/api/power-bi/users/refresh-user-permissions) API call.
+ ///
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ /// ## Limitations
+ ///
+ /// - Only datasets in a [new workspace
+ /// experience](/power-bi/collaborate-share/service-new-workspaces) workspace,
+ /// that is to say a V2 workspace, are supported.
+ /// - This API only supports adding permissions to principals who don't have
+ /// permissions to the dataset. It cannot be used to change existing dataset
+ /// permissions.
+ /// - Adding permissions to service principals (app principalType) is not
+ /// supported
+ ///
+ /// ######
+ ///
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The workspace ID
+ ///
+ ///
+ /// The dataset ID
+ ///
+ ///
+ /// Details of user access right
+ ///
+ public static void PostDatasetUserInGroup(this IDatasetsOperations operations, System.Guid groupId, string datasetId, DatasetUserAccess accessRight)
+ {
+ operations.PostDatasetUserInGroupAsync(groupId, datasetId, accessRight).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Grants the specified user the specified permissions to the specified
+ /// dataset.
+ ///
+ ///
+ ///
+ /// When user permissions to a dataset have been recently updated, the new
+ /// permissions might not be immediately available through API calls. To
+ /// refresh user permissions, use the [Refresh User
+ /// Permissions](/rest/api/power-bi/users/refresh-user-permissions) API call.
+ ///
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ /// ## Limitations
+ ///
+ /// - Only datasets in a [new workspace
+ /// experience](/power-bi/collaborate-share/service-new-workspaces) workspace,
+ /// that is to say a V2 workspace, are supported.
+ /// - This API only supports adding permissions to principals who don't have
+ /// permissions to the dataset. It cannot be used to change existing dataset
+ /// permissions.
+ /// - Adding permissions to service principals (app principalType) is not
+ /// supported
+ ///
+ /// ######
+ ///
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The workspace ID
+ ///
+ ///
+ /// The dataset ID
+ ///
+ ///
+ /// Details of user access right
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task PostDatasetUserInGroupAsync(this IDatasetsOperations operations, System.Guid groupId, string datasetId, DatasetUserAccess accessRight, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.PostDatasetUserInGroupWithHttpMessagesAsync(groupId, datasetId, accessRight, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Grants the specified user the specified permissions to the specified
+ /// dataset from **My workspace**.
+ ///
+ ///
+ ///
+ /// When user permissions to a dataset have been recently updated, the new
+ /// permissions might not be immediately available through API calls. To
+ /// refresh user permissions, use the [Refresh User
+ /// Permissions](/rest/api/power-bi/users/refresh-user-permissions) API call.
+ ///
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ /// ## Limitations
+ ///
+ /// - Only datasets in a [new workspace
+ /// experience](/power-bi/collaborate-share/service-new-workspaces) workspace,
+ /// that is to say a V2 workspace, are supported.
+ /// - This API only supports adding permissions to principals who don't have
+ /// permissions to the dataset. It cannot be used to change existing dataset
+ /// permissions.
+ /// - Adding permissions to service principals (app principalType) is not
+ /// supported
+ ///
+ /// ######
+ ///
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The dataset ID
+ ///
+ ///
+ /// Details of user access right
+ ///
+ public static void PostDatasetUser(this IDatasetsOperations operations, string datasetId, DatasetUserAccess accessRight)
+ {
+ operations.PostDatasetUserAsync(datasetId, accessRight).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Grants the specified user the specified permissions to the specified
+ /// dataset from **My workspace**.
+ ///
+ ///
+ ///
+ /// When user permissions to a dataset have been recently updated, the new
+ /// permissions might not be immediately available through API calls. To
+ /// refresh user permissions, use the [Refresh User
+ /// Permissions](/rest/api/power-bi/users/refresh-user-permissions) API call.
+ ///
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ /// ## Limitations
+ ///
+ /// - Only datasets in a [new workspace
+ /// experience](/power-bi/collaborate-share/service-new-workspaces) workspace,
+ /// that is to say a V2 workspace, are supported.
+ /// - This API only supports adding permissions to principals who don't have
+ /// permissions to the dataset. It cannot be used to change existing dataset
+ /// permissions.
+ /// - Adding permissions to service principals (app principalType) is not
+ /// supported
+ ///
+ /// ######
+ ///
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The dataset ID
+ ///
+ ///
+ /// Details of user access right
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task PostDatasetUserAsync(this IDatasetsOperations operations, string datasetId, DatasetUserAccess accessRight, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.PostDatasetUserWithHttpMessagesAsync(datasetId, accessRight, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Returns a list of datasets from the specified workspace.
///
diff --git a/sdk/PowerBI.Api/Source/GatewaysOperations.cs b/sdk/PowerBI.Api/Source/GatewaysOperations.cs
index 9776cb20..3c80727b 100644
--- a/sdk/PowerBI.Api/Source/GatewaysOperations.cs
+++ b/sdk/PowerBI.Api/Source/GatewaysOperations.cs
@@ -50,10 +50,21 @@ public GatewaysOperations(PowerBIClient client)
/// Returns a list of gateways for which the user is an admin.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All <br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// Headers that will be added to request.
@@ -182,10 +193,21 @@ public GatewaysOperations(PowerBIClient client)
/// Returns the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All <br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers to the
@@ -318,13 +340,24 @@ public GatewaysOperations(PowerBIClient client)
}
///
- /// Returns a list of datasources from the specified gateway.
+ /// Returns a list of data sources from the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All <br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers to the
@@ -457,16 +490,27 @@ public GatewaysOperations(PowerBIClient client)
}
///
- /// Creates a new datasource on the specified gateway.
+ /// Creates a new data source on the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All<li>To set the permissions scope, see [Register
- /// an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app)</li><li>To
- /// encrypt credentials, see [Encrypt
- /// credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)</li>
+ ///
+ /// To encrypt credentials, see [Configure credentials
+ /// programmatically](/power-bi/developer/automation/configure-credentials).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers to the
@@ -623,13 +667,24 @@ public GatewaysOperations(PowerBIClient client)
}
///
- /// Returns the specified datasource from the specified gateway.
+ /// Returns the specified data source from the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All <br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers to the
@@ -767,13 +822,24 @@ public GatewaysOperations(PowerBIClient client)
}
///
- /// Deletes the specified datasource from the specified gateway.
+ /// Deletes the specified data source from the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// <br/>To set the permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers to the
@@ -890,23 +956,38 @@ public GatewaysOperations(PowerBIClient client)
}
///
- /// Updates the credentials of the specified datasource from the specified
+ /// Updates the credentials of the specified data source from the specified
/// gateway.
///
///
- /// <br/>**Note:**<li>This API requires gateway admin
- /// permissions.</li><li>It is required to set
- /// *useEndUserOAuth2Credentials* to *False* when changing from SSO to other
- /// types, such as basic or OAuth2. See the [Basic credentials
- /// example](https://docs.microsoft.com/rest/api/power-bi/gateways/updatedatasource#basic-credentials-example).</li><li>With
- /// OAuth2 token credentials, make sure the generated OAuth2 token audience was
- /// set correctly according to the datasource
- /// type.</li><br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All<li>To set the permissions scope, see [Register
- /// an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app)</li><li>To
- /// encrypt credentials, see [Encrypt
- /// credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)</li>
+ ///
+ /// - Set the parameter `useEndUserOAuth2Credentials` to `False` when changing
+ /// from single sign-on to other credential types, such as **Basic** or
+ /// **OAuth2**. See the [Basic credentials
+ /// example](/rest/api/power-bi/gateways/update-datasource#basic-credentials-example).
+ /// - To encrypt credentials, see [Configure credentials
+ /// programmatically](/power-bi/developer/automation/configure-credentials).
+ /// - For the **OAuth2** credential type, make sure the generated OAuth2 token
+ /// audience was set correctly according to the data source type.
+ /// - For **Extension** data sources, don't set `useCallerAADIdentity` to
+ /// `true`. To set **OAuth2** credentials for other data sources, send the
+ /// OAuth2 token in the payload as shown in the [OAuth2 credentials
+ /// example](/rest/api/power-bi/gateways/update-datasource#oauth2-credentials-example).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers to the
@@ -1043,14 +1124,25 @@ public GatewaysOperations(PowerBIClient client)
}
///
- /// Checks the connectivity status of the specified datasource from the
+ /// Checks the connectivity status of the specified data source from the
/// specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// <br/>To set the permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers to the
@@ -1167,13 +1259,24 @@ public GatewaysOperations(PowerBIClient client)
}
///
- /// Returns a list of users who have access to the specified datasource.
+ /// Returns a list of users who have access to the specified data source.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All<br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers to the
@@ -1311,14 +1414,25 @@ public GatewaysOperations(PowerBIClient client)
}
///
- /// Grants or updates the permissions required to use the specified datasource
+ /// Grants or updates the permissions required to use the specified data source
/// for the specified user.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// <br/>To set the permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers to the
@@ -1459,13 +1573,24 @@ public GatewaysOperations(PowerBIClient client)
}
///
- /// Removes the specified user from the specified datasource.
+ /// Removes the specified user from the specified data source.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// <br/>To set the permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers to the
diff --git a/sdk/PowerBI.Api/Source/GatewaysOperationsExtensions.cs b/sdk/PowerBI.Api/Source/GatewaysOperationsExtensions.cs
index 6c20b024..b39c2a90 100644
--- a/sdk/PowerBI.Api/Source/GatewaysOperationsExtensions.cs
+++ b/sdk/PowerBI.Api/Source/GatewaysOperationsExtensions.cs
@@ -19,10 +19,21 @@ public static partial class GatewaysOperationsExtensions
/// Returns a list of gateways for which the user is an admin.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All <br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -36,10 +47,21 @@ public static Gateways GetGateways(this IGatewaysOperations operations)
/// Returns a list of gateways for which the user is an admin.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All <br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -59,10 +81,21 @@ public static Gateways GetGateways(this IGatewaysOperations operations)
/// Returns the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All <br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -81,10 +114,21 @@ public static Gateway GetGateway(this IGatewaysOperations operations, System.Gui
/// Returns the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All <br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -106,13 +150,24 @@ public static Gateway GetGateway(this IGatewaysOperations operations, System.Gui
}
///
- /// Returns a list of datasources from the specified gateway.
+ /// Returns a list of data sources from the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All <br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -128,13 +183,24 @@ public static GatewayDatasources GetDatasources(this IGatewaysOperations operati
}
///
- /// Returns a list of datasources from the specified gateway.
+ /// Returns a list of data sources from the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All <br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -156,16 +222,27 @@ public static GatewayDatasources GetDatasources(this IGatewaysOperations operati
}
///
- /// Creates a new datasource on the specified gateway.
+ /// Creates a new data source on the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All<li>To set the permissions scope, see [Register
- /// an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app)</li><li>To
- /// encrypt credentials, see [Encrypt
- /// credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)</li>
+ ///
+ /// To encrypt credentials, see [Configure credentials
+ /// programmatically](/power-bi/developer/automation/configure-credentials).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -184,16 +261,27 @@ public static GatewayDatasource CreateDatasource(this IGatewaysOperations operat
}
///
- /// Creates a new datasource on the specified gateway.
+ /// Creates a new data source on the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All<li>To set the permissions scope, see [Register
- /// an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app)</li><li>To
- /// encrypt credentials, see [Encrypt
- /// credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)</li>
+ ///
+ /// To encrypt credentials, see [Configure credentials
+ /// programmatically](/power-bi/developer/automation/configure-credentials).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -218,13 +306,24 @@ public static GatewayDatasource CreateDatasource(this IGatewaysOperations operat
}
///
- /// Returns the specified datasource from the specified gateway.
+ /// Returns the specified data source from the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All <br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -243,13 +342,24 @@ public static GatewayDatasource GetDatasource(this IGatewaysOperations operation
}
///
- /// Returns the specified datasource from the specified gateway.
+ /// Returns the specified data source from the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All <br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -274,13 +384,24 @@ public static GatewayDatasource GetDatasource(this IGatewaysOperations operation
}
///
- /// Deletes the specified datasource from the specified gateway.
+ /// Deletes the specified data source from the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// <br/>To set the permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -299,13 +420,24 @@ public static void DeleteDatasource(this IGatewaysOperations operations, System.
}
///
- /// Deletes the specified datasource from the specified gateway.
+ /// Deletes the specified data source from the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// <br/>To set the permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -327,23 +459,38 @@ public static void DeleteDatasource(this IGatewaysOperations operations, System.
}
///
- /// Updates the credentials of the specified datasource from the specified
+ /// Updates the credentials of the specified data source from the specified
/// gateway.
///
///
- /// <br/>**Note:**<li>This API requires gateway admin
- /// permissions.</li><li>It is required to set
- /// *useEndUserOAuth2Credentials* to *False* when changing from SSO to other
- /// types, such as basic or OAuth2. See the [Basic credentials
- /// example](https://docs.microsoft.com/rest/api/power-bi/gateways/updatedatasource#basic-credentials-example).</li><li>With
- /// OAuth2 token credentials, make sure the generated OAuth2 token audience was
- /// set correctly according to the datasource
- /// type.</li><br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All<li>To set the permissions scope, see [Register
- /// an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app)</li><li>To
- /// encrypt credentials, see [Encrypt
- /// credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)</li>
+ ///
+ /// - Set the parameter `useEndUserOAuth2Credentials` to `False` when changing
+ /// from single sign-on to other credential types, such as **Basic** or
+ /// **OAuth2**. See the [Basic credentials
+ /// example](/rest/api/power-bi/gateways/update-datasource#basic-credentials-example).
+ /// - To encrypt credentials, see [Configure credentials
+ /// programmatically](/power-bi/developer/automation/configure-credentials).
+ /// - For the **OAuth2** credential type, make sure the generated OAuth2 token
+ /// audience was set correctly according to the data source type.
+ /// - For **Extension** data sources, don't set `useCallerAADIdentity` to
+ /// `true`. To set **OAuth2** credentials for other data sources, send the
+ /// OAuth2 token in the payload as shown in the [OAuth2 credentials
+ /// example](/rest/api/power-bi/gateways/update-datasource#oauth2-credentials-example).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -365,23 +512,38 @@ public static void UpdateDatasource(this IGatewaysOperations operations, System.
}
///
- /// Updates the credentials of the specified datasource from the specified
+ /// Updates the credentials of the specified data source from the specified
/// gateway.
///
///
- /// <br/>**Note:**<li>This API requires gateway admin
- /// permissions.</li><li>It is required to set
- /// *useEndUserOAuth2Credentials* to *False* when changing from SSO to other
- /// types, such as basic or OAuth2. See the [Basic credentials
- /// example](https://docs.microsoft.com/rest/api/power-bi/gateways/updatedatasource#basic-credentials-example).</li><li>With
- /// OAuth2 token credentials, make sure the generated OAuth2 token audience was
- /// set correctly according to the datasource
- /// type.</li><br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All<li>To set the permissions scope, see [Register
- /// an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app)</li><li>To
- /// encrypt credentials, see [Encrypt
- /// credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)</li>
+ ///
+ /// - Set the parameter `useEndUserOAuth2Credentials` to `False` when changing
+ /// from single sign-on to other credential types, such as **Basic** or
+ /// **OAuth2**. See the [Basic credentials
+ /// example](/rest/api/power-bi/gateways/update-datasource#basic-credentials-example).
+ /// - To encrypt credentials, see [Configure credentials
+ /// programmatically](/power-bi/developer/automation/configure-credentials).
+ /// - For the **OAuth2** credential type, make sure the generated OAuth2 token
+ /// audience was set correctly according to the data source type.
+ /// - For **Extension** data sources, don't set `useCallerAADIdentity` to
+ /// `true`. To set **OAuth2** credentials for other data sources, send the
+ /// OAuth2 token in the payload as shown in the [OAuth2 credentials
+ /// example](/rest/api/power-bi/gateways/update-datasource#oauth2-credentials-example).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -406,14 +568,25 @@ public static void UpdateDatasource(this IGatewaysOperations operations, System.
}
///
- /// Checks the connectivity status of the specified datasource from the
+ /// Checks the connectivity status of the specified data source from the
/// specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// <br/>To set the permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -432,14 +605,25 @@ public static void GetDatasourceStatus(this IGatewaysOperations operations, Syst
}
///
- /// Checks the connectivity status of the specified datasource from the
+ /// Checks the connectivity status of the specified data source from the
/// specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// <br/>To set the permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -461,13 +645,24 @@ public static void GetDatasourceStatus(this IGatewaysOperations operations, Syst
}
///
- /// Returns a list of users who have access to the specified datasource.
+ /// Returns a list of users who have access to the specified data source.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All<br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -486,13 +681,24 @@ public static DatasourceUsers GetDatasourceUsers(this IGatewaysOperations operat
}
///
- /// Returns a list of users who have access to the specified datasource.
+ /// Returns a list of users who have access to the specified data source.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// or Dataset.Read.All<br/>To set the permissions scope, see [Register
- /// an app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -517,14 +723,25 @@ public static DatasourceUsers GetDatasourceUsers(this IGatewaysOperations operat
}
///
- /// Grants or updates the permissions required to use the specified datasource
+ /// Grants or updates the permissions required to use the specified data source
/// for the specified user.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// <br/>To set the permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -546,14 +763,25 @@ public static void AddDatasourceUser(this IGatewaysOperations operations, System
}
///
- /// Grants or updates the permissions required to use the specified datasource
+ /// Grants or updates the permissions required to use the specified data source
/// for the specified user.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// <br/>To set the permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -578,13 +806,24 @@ public static void AddDatasourceUser(this IGatewaysOperations operations, System
}
///
- /// Removes the specified user from the specified datasource.
+ /// Removes the specified user from the specified data source.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// <br/>To set the permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
@@ -606,13 +845,24 @@ public static void DeleteDatasourceUser(this IGatewaysOperations operations, Sys
}
///
- /// Removes the specified user from the specified datasource.
+ /// Removes the specified user from the specified data source.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**: Dataset.ReadWrite.All
- /// <br/>To set the permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The operations group for this extension method.
diff --git a/sdk/PowerBI.Api/Source/GroupsOperations.cs b/sdk/PowerBI.Api/Source/GroupsOperations.cs
index 659322c2..9b9027ed 100644
--- a/sdk/PowerBI.Api/Source/GroupsOperations.cs
+++ b/sdk/PowerBI.Api/Source/GroupsOperations.cs
@@ -2933,8 +2933,8 @@ public GroupsOperations(PowerBIClient client)
}
///
- /// Returns a list of datasets that have not been used within 30 days for the
- /// specified workspace (Preview).
+ /// Returns a list of datasets, reports, and dashboards that have not been used
+ /// within 30 days for the specified workspace (Preview).
///
///
///
@@ -2959,6 +2959,9 @@ public GroupsOperations(PowerBIClient client)
///
/// The workspace ID
///
+ ///
+ /// Token required to get the next chunk of the result set
+ ///
///
/// Headers that will be added to request.
///
@@ -2974,7 +2977,7 @@ public GroupsOperations(PowerBIClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetUnusedArtifactsAsAdminWithHttpMessagesAsync(System.Guid groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetUnusedArtifactsAsAdminWithHttpMessagesAsync(System.Guid groupId, string continuationToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
@@ -2984,6 +2987,7 @@ public GroupsOperations(PowerBIClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("groupId", groupId);
+ tracingParameters.Add("continuationToken", continuationToken);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "GetUnusedArtifactsAsAdmin", tracingParameters);
}
@@ -2991,6 +2995,15 @@ public GroupsOperations(PowerBIClient client)
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/groups/{groupId}/unused").ToString();
_url = _url.Replace("{groupId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(groupId, Client.SerializationSettings).Trim('"')));
+ List _queryParameters = new List();
+ if (continuationToken != null)
+ {
+ _queryParameters.Add(string.Format("continuationToken={0}", System.Uri.EscapeDataString(continuationToken)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += "?" + string.Join("&", _queryParameters);
+ }
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
diff --git a/sdk/PowerBI.Api/Source/GroupsOperationsExtensions.cs b/sdk/PowerBI.Api/Source/GroupsOperationsExtensions.cs
index 446d0b3c..1245f7f3 100644
--- a/sdk/PowerBI.Api/Source/GroupsOperationsExtensions.cs
+++ b/sdk/PowerBI.Api/Source/GroupsOperationsExtensions.cs
@@ -1347,8 +1347,8 @@ public static void RestoreDeletedGroupAsAdmin(this IGroupsOperations operations,
}
///
- /// Returns a list of datasets that have not been used within 30 days for the
- /// specified workspace (Preview).
+ /// Returns a list of datasets, reports, and dashboards that have not been used
+ /// within 30 days for the specified workspace (Preview).
///
///
///
@@ -1376,14 +1376,17 @@ public static void RestoreDeletedGroupAsAdmin(this IGroupsOperations operations,
///
/// The workspace ID
///
- public static UnusedArtifactsResponse GetUnusedArtifactsAsAdmin(this IGroupsOperations operations, System.Guid groupId)
+ ///
+ /// Token required to get the next chunk of the result set
+ ///
+ public static UnusedArtifactsResponse GetUnusedArtifactsAsAdmin(this IGroupsOperations operations, System.Guid groupId, string continuationToken = default(string))
{
- return operations.GetUnusedArtifactsAsAdminAsync(groupId).GetAwaiter().GetResult();
+ return operations.GetUnusedArtifactsAsAdminAsync(groupId, continuationToken).GetAwaiter().GetResult();
}
///
- /// Returns a list of datasets that have not been used within 30 days for the
- /// specified workspace (Preview).
+ /// Returns a list of datasets, reports, and dashboards that have not been used
+ /// within 30 days for the specified workspace (Preview).
///
///
///
@@ -1411,12 +1414,15 @@ public static UnusedArtifactsResponse GetUnusedArtifactsAsAdmin(this IGroupsOper
///
/// The workspace ID
///
+ ///
+ /// Token required to get the next chunk of the result set
+ ///
///
/// The cancellation token.
///
- public static async Task GetUnusedArtifactsAsAdminAsync(this IGroupsOperations operations, System.Guid groupId, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetUnusedArtifactsAsAdminAsync(this IGroupsOperations operations, System.Guid groupId, string continuationToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetUnusedArtifactsAsAdminWithHttpMessagesAsync(groupId, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetUnusedArtifactsAsAdminWithHttpMessagesAsync(groupId, continuationToken, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/sdk/PowerBI.Api/Source/IDatasetsOperations.cs b/sdk/PowerBI.Api/Source/IDatasetsOperations.cs
index 810ab71a..66866789 100644
--- a/sdk/PowerBI.Api/Source/IDatasetsOperations.cs
+++ b/sdk/PowerBI.Api/Source/IDatasetsOperations.cs
@@ -991,6 +991,107 @@ public partial interface IDatasetsOperations
///
Task> DiscoverGatewaysWithHttpMessagesAsync(string datasetId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Grants the specified user the specified permissions to the
+ /// specified dataset.
+ ///
+ ///
+ ///
+ /// When user permissions to a dataset have been recently updated, the
+ /// new permissions might not be immediately available through API
+ /// calls. To refresh user permissions, use the [Refresh User
+ /// Permissions](/rest/api/power-bi/users/refresh-user-permissions) API
+ /// call.
+ ///
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ /// ## Limitations
+ ///
+ /// - Only datasets in a [new workspace
+ /// experience](/power-bi/collaborate-share/service-new-workspaces)
+ /// workspace, that is to say a V2 workspace, are supported.
+ /// - This API only supports adding permissions to principals who don't
+ /// have permissions to the dataset. It cannot be used to change
+ /// existing dataset permissions.
+ /// - Adding permissions to service principals (app principalType) is
+ /// not supported
+ ///
+ /// ######
+ ///
+ ///
+ ///
+ /// The workspace ID
+ ///
+ ///
+ /// The dataset ID
+ ///
+ ///
+ /// Details of user access right
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task PostDatasetUserInGroupWithHttpMessagesAsync(System.Guid groupId, string datasetId, DatasetUserAccess accessRight, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Grants the specified user the specified permissions to the
+ /// specified dataset from **My workspace**.
+ ///
+ ///
+ ///
+ /// When user permissions to a dataset have been recently updated, the
+ /// new permissions might not be immediately available through API
+ /// calls. To refresh user permissions, use the [Refresh User
+ /// Permissions](/rest/api/power-bi/users/refresh-user-permissions) API
+ /// call.
+ ///
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ /// ## Limitations
+ ///
+ /// - Only datasets in a [new workspace
+ /// experience](/power-bi/collaborate-share/service-new-workspaces)
+ /// workspace, that is to say a V2 workspace, are supported.
+ /// - This API only supports adding permissions to principals who don't
+ /// have permissions to the dataset. It cannot be used to change
+ /// existing dataset permissions.
+ /// - Adding permissions to service principals (app principalType) is
+ /// not supported
+ ///
+ /// ######
+ ///
+ ///
+ ///
+ /// The dataset ID
+ ///
+ ///
+ /// Details of user access right
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task PostDatasetUserWithHttpMessagesAsync(string datasetId, DatasetUserAccess accessRight, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Returns a list of datasets from the specified workspace.
///
///
diff --git a/sdk/PowerBI.Api/Source/IGatewaysOperations.cs b/sdk/PowerBI.Api/Source/IGatewaysOperations.cs
index b2777f57..0dc09a6a 100644
--- a/sdk/PowerBI.Api/Source/IGatewaysOperations.cs
+++ b/sdk/PowerBI.Api/Source/IGatewaysOperations.cs
@@ -22,11 +22,21 @@ public partial interface IGatewaysOperations
/// Returns a list of gateways for which the user is an admin.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All or Dataset.Read.All <br/>To set the
- /// permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The headers that will be added to request.
@@ -45,11 +55,21 @@ public partial interface IGatewaysOperations
/// Returns the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All or Dataset.Read.All <br/>To set the
- /// permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers
@@ -70,14 +90,24 @@ public partial interface IGatewaysOperations
///
Task> GetGatewayWithHttpMessagesAsync(System.Guid gatewayId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Returns a list of datasources from the specified gateway.
+ /// Returns a list of data sources from the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All or Dataset.Read.All <br/>To set the
- /// permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers
@@ -98,16 +128,27 @@ public partial interface IGatewaysOperations
///
Task> GetDatasourcesWithHttpMessagesAsync(System.Guid gatewayId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Creates a new datasource on the specified gateway.
+ /// Creates a new data source on the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All<li>To set the permissions scope, see
- /// [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app)</li><li>To
- /// encrypt credentials, see [Encrypt
- /// credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)</li>
+ ///
+ /// To encrypt credentials, see [Configure credentials
+ /// programmatically](/power-bi/developer/automation/configure-credentials).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers
@@ -134,14 +175,24 @@ public partial interface IGatewaysOperations
///
Task> CreateDatasourceWithHttpMessagesAsync(System.Guid gatewayId, PublishDatasourceToGatewayRequest datasourceToGatewayRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Returns the specified datasource from the specified gateway.
+ /// Returns the specified data source from the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All or Dataset.Read.All <br/>To set the
- /// permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers
@@ -165,14 +216,24 @@ public partial interface IGatewaysOperations
///
Task> GetDatasourceWithHttpMessagesAsync(System.Guid gatewayId, System.Guid datasourceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Deletes the specified datasource from the specified gateway.
+ /// Deletes the specified data source from the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All <br/>To set the permissions scope, see
- /// [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers
@@ -193,23 +254,40 @@ public partial interface IGatewaysOperations
///
Task DeleteDatasourceWithHttpMessagesAsync(System.Guid gatewayId, System.Guid datasourceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Updates the credentials of the specified datasource from the
+ /// Updates the credentials of the specified data source from the
/// specified gateway.
///
///
- /// <br/>**Note:**<li>This API requires gateway admin
- /// permissions.</li><li>It is required to set
- /// *useEndUserOAuth2Credentials* to *False* when changing from SSO to
- /// other types, such as basic or OAuth2. See the [Basic credentials
- /// example](https://docs.microsoft.com/rest/api/power-bi/gateways/updatedatasource#basic-credentials-example).</li><li>With
- /// OAuth2 token credentials, make sure the generated OAuth2 token
- /// audience was set correctly according to the datasource
- /// type.</li><br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All<li>To set the permissions scope, see
- /// [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app)</li><li>To
- /// encrypt credentials, see [Encrypt
- /// credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)</li>
+ ///
+ /// - Set the parameter `useEndUserOAuth2Credentials` to `False` when
+ /// changing from single sign-on to other credential types, such as
+ /// **Basic** or **OAuth2**. See the [Basic credentials
+ /// example](/rest/api/power-bi/gateways/update-datasource#basic-credentials-example).
+ /// - To encrypt credentials, see [Configure credentials
+ /// programmatically](/power-bi/developer/automation/configure-credentials).
+ /// - For the **OAuth2** credential type, make sure the generated
+ /// OAuth2 token audience was set correctly according to the data
+ /// source type.
+ /// - For **Extension** data sources, don't set `useCallerAADIdentity`
+ /// to `true`. To set **OAuth2** credentials for other data sources,
+ /// send the OAuth2 token in the payload as shown in the [OAuth2
+ /// credentials
+ /// example](/rest/api/power-bi/gateways/update-datasource#oauth2-credentials-example).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers
@@ -236,15 +314,25 @@ public partial interface IGatewaysOperations
///
Task UpdateDatasourceWithHttpMessagesAsync(System.Guid gatewayId, System.Guid datasourceId, UpdateDatasourceRequest updateDatasourceRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Checks the connectivity status of the specified datasource from the
- /// specified gateway.
+ /// Checks the connectivity status of the specified data source from
+ /// the specified gateway.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All <br/>To set the permissions scope, see
- /// [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers
@@ -265,15 +353,25 @@ public partial interface IGatewaysOperations
///
Task GetDatasourceStatusWithHttpMessagesAsync(System.Guid gatewayId, System.Guid datasourceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Returns a list of users who have access to the specified
- /// datasource.
+ /// Returns a list of users who have access to the specified data
+ /// source.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All or Dataset.Read.All<br/>To set the
- /// permissions scope, see [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All or Dataset.Read.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers
@@ -298,14 +396,24 @@ public partial interface IGatewaysOperations
Task> GetDatasourceUsersWithHttpMessagesAsync(System.Guid gatewayId, System.Guid datasourceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Grants or updates the permissions required to use the specified
- /// datasource for the specified user.
+ /// data source for the specified user.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All <br/>To set the permissions scope, see
- /// [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers
@@ -332,14 +440,24 @@ public partial interface IGatewaysOperations
///
Task AddDatasourceUserWithHttpMessagesAsync(System.Guid gatewayId, System.Guid datasourceId, DatasourceUser addUserToDatasourceRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Removes the specified user from the specified datasource.
+ /// Removes the specified user from the specified data source.
///
///
- /// <br/>**Note:** This API requires gateway admin
- /// permissions.<br/><br/>**Required scope**:
- /// Dataset.ReadWrite.All <br/>To set the permissions scope, see
- /// [Register an
- /// app](https://docs.microsoft.com/power-bi/developer/register-app).
+ ///
+ /// ## Permissions
+ ///
+ /// The user must have gateway admin permissions.
+ ///
+ /// ## Required scope
+ ///
+ /// Dataset.ReadWrite.All
+ ///
+ /// ## Limitations
+ ///
+ /// Virtual network (VNet) gateways aren't supported.
+ ///
+ /// ######
+ ///
///
///
/// The gateway ID. When using a gateway cluster, the gateway ID refers
diff --git a/sdk/PowerBI.Api/Source/IGroupsOperations.cs b/sdk/PowerBI.Api/Source/IGroupsOperations.cs
index 9bc2fd1e..5477bb1d 100644
--- a/sdk/PowerBI.Api/Source/IGroupsOperations.cs
+++ b/sdk/PowerBI.Api/Source/IGroupsOperations.cs
@@ -749,8 +749,8 @@ public partial interface IGroupsOperations
///
Task RestoreDeletedGroupAsAdminWithHttpMessagesAsync(System.Guid groupId, GroupRestoreRequest groupRestoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Returns a list of datasets that have not been used within 30 days
- /// for the specified workspace (Preview).
+ /// Returns a list of datasets, reports, and dashboards that have not
+ /// been used within 30 days for the specified workspace (Preview).
///
///
///
@@ -775,6 +775,9 @@ public partial interface IGroupsOperations
///
/// The workspace ID
///
+ ///
+ /// Token required to get the next chunk of the result set
+ ///
///
/// The headers that will be added to request.
///
@@ -787,6 +790,6 @@ public partial interface IGroupsOperations
///
/// Thrown when unable to deserialize the response
///
- Task> GetUnusedArtifactsAsAdminWithHttpMessagesAsync(System.Guid groupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GetUnusedArtifactsAsAdminWithHttpMessagesAsync(System.Guid groupId, string continuationToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/PowerBI.Api/Source/IUsers.cs b/sdk/PowerBI.Api/Source/IUsers.cs
index 2603d7fc..005a0f76 100644
--- a/sdk/PowerBI.Api/Source/IUsers.cs
+++ b/sdk/PowerBI.Api/Source/IUsers.cs
@@ -80,8 +80,8 @@ public partial interface IUsers
/// ######
///
///
- ///
- /// The graph ID of user
+ ///
+ /// The graph ID or UPN of user
///
///
/// Token required to get the next chunk of the result set
@@ -98,15 +98,16 @@ public partial interface IUsers
///
/// Thrown when unable to deserialize the response
///
- Task> GetUserArtifactAccessAsAdminWithHttpMessagesAsync(System.Guid userGraphId, string continuationToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetUserArtifactAccessAsAdminWithHttpMessagesAsync(string userId, string continuationToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Returns a list of subscriptions that the given user has subscribed
/// to (Preview).
///
///
///
- /// ### userId
- /// - The UserId can be userGraphId or UserPrincipalName
/// ### Permissions
///
/// - The user must have administrator rights (such as Office 365
@@ -126,7 +127,7 @@ public partial interface IUsers
///
///
///
- /// The graph ID of user or User Principal Name of the user
+ /// The graph ID or UPN of user
///
///
/// Token required to get the next chunk of the result set
@@ -143,6 +144,9 @@ public partial interface IUsers
///
/// Thrown when unable to deserialize the response
///
- Task> GetUserSubscriptionsAsAdminWithHttpMessagesAsync(System.Guid userId, string continuationToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetUserSubscriptionsAsAdminWithHttpMessagesAsync(string userId, string continuationToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/sdk/PowerBI.Api/Source/Models/AdditionalFeatureInfo.cs b/sdk/PowerBI.Api/Source/Models/AdditionalFeatureInfo.cs
index 2eda27f3..ed21198f 100644
--- a/sdk/PowerBI.Api/Source/Models/AdditionalFeatureInfo.cs
+++ b/sdk/PowerBI.Api/Source/Models/AdditionalFeatureInfo.cs
@@ -25,8 +25,14 @@ public AdditionalFeatureInfo()
///
/// Initializes a new instance of the AdditionalFeatureInfo class.
///
- /// The token generation usage (in %) from the
- /// limitation on shared capacity
+ /// Workspaces that aren’t assigned to a capacity
+ /// get a limited amount of [embed
+ /// tokens](/power-bi/developer/embedded/embed-tokens#embed-token), to
+ /// allow experimenting with the APIs. The `Usage` value represents the
+ /// percentage of embed tokens that have been consumed. The `Usage`
+ /// value only applies to the **embed trial** feature. For more
+ /// information, see [Development
+ /// testing](/power-bi/developer/embedded/move-to-production#development-testing).
public AdditionalFeatureInfo(int? usage = default(int?))
{
Usage = usage;
@@ -39,8 +45,14 @@ public AdditionalFeatureInfo()
partial void CustomInit();
///
- /// Gets or sets the token generation usage (in %) from the limitation
- /// on shared capacity
+ /// Gets or sets workspaces that aren’t assigned to a capacity get a
+ /// limited amount of [embed
+ /// tokens](/power-bi/developer/embedded/embed-tokens#embed-token), to
+ /// allow experimenting with the APIs. The `Usage` value represents the
+ /// percentage of embed tokens that have been consumed. The `Usage`
+ /// value only applies to the **embed trial** feature. For more
+ /// information, see [Development
+ /// testing](/power-bi/developer/embedded/move-to-production#development-testing).
///
[JsonProperty(PropertyName = "Usage")]
public int? Usage { get; set; }
diff --git a/sdk/PowerBI.Api/Source/Models/DatasetUserAccess.cs b/sdk/PowerBI.Api/Source/Models/DatasetUserAccess.cs
new file mode 100644
index 00000000..e9cdb38d
--- /dev/null
+++ b/sdk/PowerBI.Api/Source/Models/DatasetUserAccess.cs
@@ -0,0 +1,89 @@
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.PowerBI.Api.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A Power BI user access right entry for a dataset
+ ///
+ public partial class DatasetUserAccess
+ {
+ ///
+ /// Initializes a new instance of the DatasetUserAccess class.
+ ///
+ public DatasetUserAccess()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatasetUserAccess class.
+ ///
+ /// (Required) The access right a user has
+ /// for the dataset. Possible values include: 'Read', 'ReadReshare',
+ /// 'ReadExplore', 'ReadReshareExplore'
+ /// For principal type `User`, enter *UPN*.
+ /// Otherwise provide the [object
+ /// ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id)
+ /// of the principal.
+ /// Possible values include: 'None',
+ /// 'User', 'Group', 'App'
+ public DatasetUserAccess(DatasetUserAccessRightEntry accessRight, string identifier, PrincipalType principalType)
+ {
+ AccessRight = accessRight;
+ Identifier = identifier;
+ PrincipalType = principalType;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets (Required) The access right a user has for the
+ /// dataset. Possible values include: 'Read', 'ReadReshare',
+ /// 'ReadExplore', 'ReadReshareExplore'
+ ///
+ [JsonProperty(PropertyName = "accessRight")]
+ public DatasetUserAccessRightEntry AccessRight { get; set; }
+
+ ///
+ /// Gets or sets for principal type `User`, enter *UPN*. Otherwise
+ /// provide the [object
+ /// ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id)
+ /// of the principal.
+ ///
+ [JsonProperty(PropertyName = "identifier")]
+ public string Identifier { get; set; }
+
+ ///
+ /// Gets or sets possible values include: 'None', 'User', 'Group',
+ /// 'App'
+ ///
+ [JsonProperty(PropertyName = "principalType")]
+ public PrincipalType PrincipalType { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Identifier == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Identifier");
+ }
+ }
+ }
+}
diff --git a/sdk/PowerBI.Api/Source/Models/DatasetUserAccessRightEntry.cs b/sdk/PowerBI.Api/Source/Models/DatasetUserAccessRightEntry.cs
new file mode 100644
index 00000000..cedc3b31
--- /dev/null
+++ b/sdk/PowerBI.Api/Source/Models/DatasetUserAccessRightEntry.cs
@@ -0,0 +1,117 @@
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.PowerBI.Api.Models
+{
+ using Newtonsoft.Json;
+
+ ///
+ /// Defines values for DatasetUserAccessRightEntry.
+ ///
+ ///
+ /// Determine base value for a given allowed value if exists, else return
+ /// the value itself
+ ///
+ [JsonConverter(typeof(DatasetUserAccessRightEntryConverter))]
+ public struct DatasetUserAccessRightEntry : System.IEquatable
+ {
+ private DatasetUserAccessRightEntry(string underlyingValue)
+ {
+ UnderlyingValue=underlyingValue;
+ }
+
+ ///
+ /// Grants Read access to content in dataset
+ ///
+ public static readonly DatasetUserAccessRightEntry Read = "Read";
+
+ ///
+ /// Grants Read and Reshare access to content in dataset
+ ///
+ public static readonly DatasetUserAccessRightEntry ReadReshare = "ReadReshare";
+
+ ///
+ /// Grants Read and Explore access to content in dataset
+ ///
+ public static readonly DatasetUserAccessRightEntry ReadExplore = "ReadExplore";
+
+ ///
+ /// Grants Read, Reshare and Explore access to content in dataset
+ ///
+ public static readonly DatasetUserAccessRightEntry ReadReshareExplore = "ReadReshareExplore";
+
+
+ ///
+ /// Underlying value of enum DatasetUserAccessRightEntry
+ ///
+ private readonly string UnderlyingValue;
+
+ ///
+ /// Returns string representation for DatasetUserAccessRightEntry
+ ///
+ public override string ToString()
+ {
+ return UnderlyingValue.ToString();
+ }
+
+ ///
+ /// Compares enums of type DatasetUserAccessRightEntry
+ ///
+ public bool Equals(DatasetUserAccessRightEntry e)
+ {
+ return UnderlyingValue.Equals(e.UnderlyingValue);
+ }
+
+ ///
+ /// Implicit operator to convert string to DatasetUserAccessRightEntry
+ ///
+ public static implicit operator DatasetUserAccessRightEntry(string value)
+ {
+ return new DatasetUserAccessRightEntry(value);
+ }
+
+ ///
+ /// Implicit operator to convert DatasetUserAccessRightEntry to string
+ ///
+ public static implicit operator string(DatasetUserAccessRightEntry e)
+ {
+ return e.UnderlyingValue;
+ }
+
+ ///
+ /// Overriding == operator for enum DatasetUserAccessRightEntry
+ ///
+ public static bool operator == (DatasetUserAccessRightEntry e1, DatasetUserAccessRightEntry e2)
+ {
+ return e2.Equals(e1);
+ }
+
+ ///
+ /// Overriding != operator for enum DatasetUserAccessRightEntry
+ ///
+ public static bool operator != (DatasetUserAccessRightEntry e1, DatasetUserAccessRightEntry e2)
+ {
+ return !e2.Equals(e1);
+ }
+
+ ///
+ /// Overrides Equals operator for DatasetUserAccessRightEntry
+ ///
+ public override bool Equals(object obj)
+ {
+ return obj is DatasetUserAccessRightEntry && Equals((DatasetUserAccessRightEntry)obj);
+ }
+
+ ///
+ /// Returns for hashCode DatasetUserAccessRightEntry
+ ///
+ public override int GetHashCode()
+ {
+ return UnderlyingValue.GetHashCode();
+ }
+
+ }
+}
diff --git a/sdk/PowerBI.Api/Source/Models/DatasetUserAccessRightEntryConverter.cs b/sdk/PowerBI.Api/Source/Models/DatasetUserAccessRightEntryConverter.cs
new file mode 100644
index 00000000..85e6233a
--- /dev/null
+++ b/sdk/PowerBI.Api/Source/Models/DatasetUserAccessRightEntryConverter.cs
@@ -0,0 +1,51 @@
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.PowerBI.Api.Models
+{
+ using Newtonsoft.Json;
+
+ using System.Reflection;
+
+ ///
+ /// Defines values for DatasetUserAccessRightEntry.
+ ///
+ public sealed class DatasetUserAccessRightEntryConverter : JsonConverter
+ {
+
+ ///
+ /// Returns if objectType can be converted to
+ /// DatasetUserAccessRightEntry by the converter.
+ ///
+ public override bool CanConvert(System.Type objectType)
+ {
+ return typeof(DatasetUserAccessRightEntry).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
+ }
+
+ ///
+ /// Overrides ReadJson and converts token to
+ /// DatasetUserAccessRightEntry.
+ ///
+ public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
+ {
+ if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
+ {
+ return null;
+ }
+ return (DatasetUserAccessRightEntry)serializer.Deserialize(reader);
+ }
+
+ ///
+ /// Overriding WriteJson for DatasetUserAccessRightEntry for
+ /// serialization.
+ ///
+ public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
+ {
+ writer.WriteValue(value.ToString());
+ }
+
+ }
+}
diff --git a/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2Dataset.cs b/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2Dataset.cs
index 14bf95a4..4994a8a1 100644
--- a/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2Dataset.cs
+++ b/sdk/PowerBI.Api/Source/Models/GenerateTokenRequestV2Dataset.cs
@@ -29,9 +29,12 @@ public GenerateTokenRequestV2Dataset()
/// class.
///
/// The dataset ID
- public GenerateTokenRequestV2Dataset(string id)
+ /// XMLA Permissions. Possible values
+ /// include: 'Off', 'ReadOnly'
+ public GenerateTokenRequestV2Dataset(string id, XmlaPermissions? xmlaPermissions = default(XmlaPermissions?))
{
Id = id;
+ XmlaPermissions = xmlaPermissions;
CustomInit();
}
@@ -46,6 +49,13 @@ public GenerateTokenRequestV2Dataset(string id)
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
+ ///
+ /// Gets or sets XMLA Permissions. Possible values include: 'Off',
+ /// 'ReadOnly'
+ ///
+ [JsonProperty(PropertyName = "xmlaPermissions")]
+ public XmlaPermissions? XmlaPermissions { get; set; }
+
///
/// Validate the object.
///
diff --git a/sdk/PowerBI.Api/Source/Models/UnusedArtifactsResponse.cs b/sdk/PowerBI.Api/Source/Models/UnusedArtifactsResponse.cs
index 81b4150b..e2063dd9 100644
--- a/sdk/PowerBI.Api/Source/Models/UnusedArtifactsResponse.cs
+++ b/sdk/PowerBI.Api/Source/Models/UnusedArtifactsResponse.cs
@@ -29,9 +29,15 @@ public UnusedArtifactsResponse()
///
/// The unused artifact
/// entities
- public UnusedArtifactsResponse(IList unusedArtifactEntities = default(IList))
+ /// The URI for the next chunk in the
+ /// result set
+ /// Token to get the next chunk of the
+ /// result set
+ public UnusedArtifactsResponse(IList unusedArtifactEntities = default(IList), string continuationUri = default(string), string continuationToken = default(string))
{
UnusedArtifactEntities = unusedArtifactEntities;
+ ContinuationUri = continuationUri;
+ ContinuationToken = continuationToken;
CustomInit();
}
@@ -46,5 +52,17 @@ public UnusedArtifactsResponse()
[JsonProperty(PropertyName = "unusedArtifactEntities")]
public IList UnusedArtifactEntities { get; set; }
+ ///
+ /// Gets or sets the URI for the next chunk in the result set
+ ///
+ [JsonProperty(PropertyName = "continuationUri")]
+ public string ContinuationUri { get; set; }
+
+ ///
+ /// Gets or sets token to get the next chunk of the result set
+ ///
+ [JsonProperty(PropertyName = "continuationToken")]
+ public string ContinuationToken { get; set; }
+
}
}
diff --git a/sdk/PowerBI.Api/Source/Models/XmlaPermissions.cs b/sdk/PowerBI.Api/Source/Models/XmlaPermissions.cs
new file mode 100644
index 00000000..4720515e
--- /dev/null
+++ b/sdk/PowerBI.Api/Source/Models/XmlaPermissions.cs
@@ -0,0 +1,109 @@
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.PowerBI.Api.Models
+{
+ using Newtonsoft.Json;
+
+ ///
+ /// Defines values for XmlaPermissions.
+ ///
+ ///
+ /// Determine base value for a given allowed value if exists, else return
+ /// the value itself
+ ///
+ [JsonConverter(typeof(XmlaPermissionsConverter))]
+ public struct XmlaPermissions : System.IEquatable
+ {
+ private XmlaPermissions(string underlyingValue)
+ {
+ UnderlyingValue=underlyingValue;
+ }
+
+ ///
+ /// Indicates that the generated embed token doesn't grant access
+ /// permissions to the dataset's XMLA endpoint.
+ ///
+ public static readonly XmlaPermissions Off = "Off";
+
+ ///
+ /// Indicates that the generated embed token grants Read access
+ /// permissions to the dataset's XMLA endpoint.
+ ///
+ public static readonly XmlaPermissions ReadOnly = "ReadOnly";
+
+
+ ///
+ /// Underlying value of enum XmlaPermissions
+ ///
+ private readonly string UnderlyingValue;
+
+ ///
+ /// Returns string representation for XmlaPermissions
+ ///
+ public override string ToString()
+ {
+ return UnderlyingValue.ToString();
+ }
+
+ ///
+ /// Compares enums of type XmlaPermissions
+ ///
+ public bool Equals(XmlaPermissions e)
+ {
+ return UnderlyingValue.Equals(e.UnderlyingValue);
+ }
+
+ ///
+ /// Implicit operator to convert string to XmlaPermissions
+ ///
+ public static implicit operator XmlaPermissions(string value)
+ {
+ return new XmlaPermissions(value);
+ }
+
+ ///
+ /// Implicit operator to convert XmlaPermissions to string
+ ///
+ public static implicit operator string(XmlaPermissions e)
+ {
+ return e.UnderlyingValue;
+ }
+
+ ///
+ /// Overriding == operator for enum XmlaPermissions
+ ///
+ public static bool operator == (XmlaPermissions e1, XmlaPermissions e2)
+ {
+ return e2.Equals(e1);
+ }
+
+ ///
+ /// Overriding != operator for enum XmlaPermissions
+ ///
+ public static bool operator != (XmlaPermissions e1, XmlaPermissions e2)
+ {
+ return !e2.Equals(e1);
+ }
+
+ ///
+ /// Overrides Equals operator for XmlaPermissions
+ ///
+ public override bool Equals(object obj)
+ {
+ return obj is XmlaPermissions && Equals((XmlaPermissions)obj);
+ }
+
+ ///
+ /// Returns for hashCode XmlaPermissions
+ ///
+ public override int GetHashCode()
+ {
+ return UnderlyingValue.GetHashCode();
+ }
+
+ }
+}
diff --git a/sdk/PowerBI.Api/Source/Models/XmlaPermissionsConverter.cs b/sdk/PowerBI.Api/Source/Models/XmlaPermissionsConverter.cs
new file mode 100644
index 00000000..10e2e852
--- /dev/null
+++ b/sdk/PowerBI.Api/Source/Models/XmlaPermissionsConverter.cs
@@ -0,0 +1,49 @@
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.PowerBI.Api.Models
+{
+ using Newtonsoft.Json;
+
+ using System.Reflection;
+
+ ///
+ /// Defines values for XmlaPermissions.
+ ///
+ public sealed class XmlaPermissionsConverter : JsonConverter
+ {
+
+ ///
+ /// Returns if objectType can be converted to XmlaPermissions by the
+ /// converter.
+ ///
+ public override bool CanConvert(System.Type objectType)
+ {
+ return typeof(XmlaPermissions).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo());
+ }
+
+ ///
+ /// Overrides ReadJson and converts token to XmlaPermissions.
+ ///
+ public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer)
+ {
+ if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
+ {
+ return null;
+ }
+ return (XmlaPermissions)serializer.Deserialize(reader);
+ }
+
+ ///
+ /// Overriding WriteJson for XmlaPermissions for serialization.
+ ///
+ public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
+ {
+ writer.WriteValue(value.ToString());
+ }
+
+ }
+}
diff --git a/sdk/PowerBI.Api/Source/Users.cs b/sdk/PowerBI.Api/Source/Users.cs
index 39598346..7d109d6c 100644
--- a/sdk/PowerBI.Api/Source/Users.cs
+++ b/sdk/PowerBI.Api/Source/Users.cs
@@ -198,8 +198,8 @@ public Users(PowerBIClient client)
/// ######
///
///
- ///
- /// The graph ID of user
+ ///
+ /// The graph ID or UPN of user
///
///
/// Token required to get the next chunk of the result set
@@ -216,11 +216,21 @@ public Users(PowerBIClient client)
///
/// Thrown when unable to deserialize the response
///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
///
/// A response object containing the response body and response headers.
///
- public async Task> GetUserArtifactAccessAsAdminWithHttpMessagesAsync(System.Guid userGraphId, string continuationToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetUserArtifactAccessAsAdminWithHttpMessagesAsync(string userId, string continuationToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (userId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "userId");
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -228,15 +238,15 @@ public Users(PowerBIClient client)
{
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("userGraphId", userGraphId);
+ tracingParameters.Add("userId", userId);
tracingParameters.Add("continuationToken", continuationToken);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "GetUserArtifactAccessAsAdmin", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/users/{userGraphId}/artifactAccess").ToString();
- _url = _url.Replace("{userGraphId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(userGraphId, Client.SerializationSettings).Trim('"')));
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/users/{userId}/artifactAccess").ToString();
+ _url = _url.Replace("{userId}", System.Uri.EscapeDataString(userId));
List _queryParameters = new List();
if (continuationToken != null)
{
@@ -345,8 +355,6 @@ public Users(PowerBIClient client)
///
///
///
- /// ### userId
- /// - The UserId can be userGraphId or UserPrincipalName
/// ### Permissions
///
/// - The user must have administrator rights (such as Office 365 Global
@@ -366,7 +374,7 @@ public Users(PowerBIClient client)
///
///
///
- /// The graph ID of user or User Principal Name of the user
+ /// The graph ID or UPN of user
///
///
/// Token required to get the next chunk of the result set
@@ -383,11 +391,21 @@ public Users(PowerBIClient client)
///
/// Thrown when unable to deserialize the response
///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
///
/// A response object containing the response body and response headers.
///
- public async Task> GetUserSubscriptionsAsAdminWithHttpMessagesAsync(System.Guid userId, string continuationToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetUserSubscriptionsAsAdminWithHttpMessagesAsync(string userId, string continuationToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
+ if (userId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "userId");
+ }
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
@@ -403,7 +421,7 @@ public Users(PowerBIClient client)
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v1.0/myorg/admin/users/{userId}/subscriptions").ToString();
- _url = _url.Replace("{userId}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(userId, Client.SerializationSettings).Trim('"')));
+ _url = _url.Replace("{userId}", System.Uri.EscapeDataString(userId));
List _queryParameters = new List();
if (continuationToken != null)
{
diff --git a/sdk/PowerBI.Api/Source/UsersExtensions.cs b/sdk/PowerBI.Api/Source/UsersExtensions.cs
index 1644c89b..5e991ea0 100644
--- a/sdk/PowerBI.Api/Source/UsersExtensions.cs
+++ b/sdk/PowerBI.Api/Source/UsersExtensions.cs
@@ -114,15 +114,15 @@ public static void RefreshUserPermissions(this IUsers operations)
///
/// The operations group for this extension method.
///
- ///
- /// The graph ID of user
+ ///
+ /// The graph ID or UPN of user
///
///
/// Token required to get the next chunk of the result set
///
- public static ArtifactAccessResponse GetUserArtifactAccessAsAdmin(this IUsers operations, System.Guid userGraphId, string continuationToken = default(string))
+ public static ArtifactAccessResponse GetUserArtifactAccessAsAdmin(this IUsers operations, string userId, string continuationToken = default(string))
{
- return operations.GetUserArtifactAccessAsAdminAsync(userGraphId, continuationToken).GetAwaiter().GetResult();
+ return operations.GetUserArtifactAccessAsAdminAsync(userId, continuationToken).GetAwaiter().GetResult();
}
///
@@ -151,8 +151,8 @@ public static void RefreshUserPermissions(this IUsers operations)
///
/// The operations group for this extension method.
///
- ///
- /// The graph ID of user
+ ///
+ /// The graph ID or UPN of user
///
///
/// Token required to get the next chunk of the result set
@@ -160,9 +160,9 @@ public static void RefreshUserPermissions(this IUsers operations)
///
/// The cancellation token.
///
- public static async Task GetUserArtifactAccessAsAdminAsync(this IUsers operations, System.Guid userGraphId, string continuationToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetUserArtifactAccessAsAdminAsync(this IUsers operations, string userId, string continuationToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.GetUserArtifactAccessAsAdminWithHttpMessagesAsync(userGraphId, continuationToken, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.GetUserArtifactAccessAsAdminWithHttpMessagesAsync(userId, continuationToken, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
@@ -174,8 +174,6 @@ public static void RefreshUserPermissions(this IUsers operations)
///
///
///
- /// ### userId
- /// - The UserId can be userGraphId or UserPrincipalName
/// ### Permissions
///
/// - The user must have administrator rights (such as Office 365 Global
@@ -198,12 +196,12 @@ public static void RefreshUserPermissions(this IUsers operations)
/// The operations group for this extension method.
///
///
- /// The graph ID of user or User Principal Name of the user
+ /// The graph ID or UPN of user
///
///
/// Token required to get the next chunk of the result set
///
- public static SubscriptionsByUserResponse GetUserSubscriptionsAsAdmin(this IUsers operations, System.Guid userId, string continuationToken = default(string))
+ public static SubscriptionsByUserResponse GetUserSubscriptionsAsAdmin(this IUsers operations, string userId, string continuationToken = default(string))
{
return operations.GetUserSubscriptionsAsAdminAsync(userId, continuationToken).GetAwaiter().GetResult();
}
@@ -214,8 +212,6 @@ public static void RefreshUserPermissions(this IUsers operations)
///
///
///
- /// ### userId
- /// - The UserId can be userGraphId or UserPrincipalName
/// ### Permissions
///
/// - The user must have administrator rights (such as Office 365 Global
@@ -238,7 +234,7 @@ public static void RefreshUserPermissions(this IUsers operations)
/// The operations group for this extension method.
///
///
- /// The graph ID of user or User Principal Name of the user
+ /// The graph ID or UPN of user
///
///
/// Token required to get the next chunk of the result set
@@ -246,7 +242,7 @@ public static void RefreshUserPermissions(this IUsers operations)
///
/// The cancellation token.
///
- public static async Task GetUserSubscriptionsAsAdminAsync(this IUsers operations, System.Guid userId, string continuationToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task GetUserSubscriptionsAsAdminAsync(this IUsers operations, string userId, string continuationToken = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetUserSubscriptionsAsAdminWithHttpMessagesAsync(userId, continuationToken, null, cancellationToken).ConfigureAwait(false))
{
diff --git a/sdk/swaggers/swagger.json b/sdk/swaggers/swagger.json
index e24a67fb..c6284147 100644
--- a/sdk/swaggers/swagger.json
+++ b/sdk/swaggers/swagger.json
@@ -1745,6 +1745,150 @@
"deprecated": false
}
},
+ "/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/users": {
+ "post": {
+ "tags": [
+ "Datasets"
+ ],
+ "summary": "Grants the specified user the specified permissions to the specified dataset.",
+ "description": "\nWhen user permissions to a dataset have been recently updated, the new permissions might not be immediately available through API calls. To refresh user permissions, use the [Refresh User Permissions](/rest/api/power-bi/users/refresh-user-permissions) API call.\n\n\n## Required scope\n\nDataset.ReadWrite.All\n## Limitations\n\n- Only datasets in a [new workspace experience](/power-bi/collaborate-share/service-new-workspaces) workspace, that is to say a V2 workspace, are supported.\n- This API only supports adding permissions to principals who don't have permissions to the dataset. It cannot be used to change existing dataset permissions.\n- Adding permissions to service principals (app principalType) is not supported\n\n######\n",
+ "operationId": "Datasets_PostDatasetUserInGroup",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ ],
+ "parameters": [
+ {
+ "name": "groupId",
+ "in": "path",
+ "description": "The workspace ID",
+ "required": true,
+ "type": "string",
+ "format": "uuid"
+ },
+ {
+ "name": "datasetId",
+ "in": "path",
+ "description": "The dataset ID",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "accessRight",
+ "in": "body",
+ "description": "Details of user access right",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/DatasetUserAccess"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ },
+ "x-ms-examples": {
+ "example": {
+ "parameters": {
+ "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48",
+ "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
+ "accessRight": {
+ "identifier": "john@contoso.com",
+ "principalType": "User",
+ "groupUserAccessRight": "Read"
+ }
+ },
+ "responses": {
+ "200": {}
+ }
+ },
+ "example for giving ReadExplore right to a security group": {
+ "parameters": {
+ "groupId": "f089354e-8366-4e18-aea3-4cb4a3a50b48",
+ "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
+ "userDetails": {
+ "identifier": "154aef10-47b8-48c4-ab97-f0bf9d5f8fcf",
+ "groupUserAccessRight": "ReadReshare",
+ "principalType": "Group"
+ }
+ },
+ "responses": {
+ "200": {}
+ }
+ }
+ },
+ "deprecated": false
+ }
+ },
+ "/v1.0/myorg/datasets/{datasetId}/users": {
+ "post": {
+ "tags": [
+ "Datasets"
+ ],
+ "summary": "Grants the specified user the specified permissions to the specified dataset from **My workspace**.",
+ "description": "\nWhen user permissions to a dataset have been recently updated, the new permissions might not be immediately available through API calls. To refresh user permissions, use the [Refresh User Permissions](/rest/api/power-bi/users/refresh-user-permissions) API call.\n\n\n## Required scope\n\nDataset.ReadWrite.All\n## Limitations\n\n- Only datasets in a [new workspace experience](/power-bi/collaborate-share/service-new-workspaces) workspace, that is to say a V2 workspace, are supported.\n- This API only supports adding permissions to principals who don't have permissions to the dataset. It cannot be used to change existing dataset permissions.\n- Adding permissions to service principals (app principalType) is not supported\n\n######\n",
+ "operationId": "Datasets_PostDatasetUser",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ ],
+ "parameters": [
+ {
+ "name": "datasetId",
+ "in": "path",
+ "description": "The dataset ID",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "accessRight",
+ "in": "body",
+ "description": "Details of user access right",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/DatasetUserAccess"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OK"
+ }
+ },
+ "x-ms-examples": {
+ "example": {
+ "parameters": {
+ "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
+ "accessRight": {
+ "identifier": "john@contoso.com",
+ "principalType": "User",
+ "groupUserAccessRight": "Read"
+ }
+ },
+ "responses": {
+ "200": {}
+ }
+ },
+ "example for giving ReadExplore right to a security group": {
+ "parameters": {
+ "datasetId": "cfafbeb1-8037-4d0c-896e-a46fb27ff229",
+ "userDetails": {
+ "identifier": "154aef10-47b8-48c4-ab97-f0bf9d5f8fcf",
+ "groupUserAccessRight": "ReadReshare",
+ "principalType": "Group"
+ }
+ },
+ "responses": {
+ "200": {}
+ }
+ }
+ },
+ "deprecated": false
+ }
+ },
"/v1.0/myorg/RefreshUserPermissions": {
"post": {
"tags": [
@@ -8317,7 +8461,7 @@
"Gateways"
],
"summary": "Returns a list of gateways for which the user is an admin.",
- "description": "
**Note:** This API requires gateway admin permissions.
**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).",
+ "description": "\n## Permissions\n\nThe user must have gateway admin permissions.\n\n## Required scope\n\nDataset.ReadWrite.All or Dataset.Read.All\n\n## Limitations\n\nVirtual network (VNet) gateways aren't supported.\n\n######\n",
"operationId": "Gateways_GetGateways",
"consumes": [],
"produces": [
@@ -8363,7 +8507,7 @@
"Gateways"
],
"summary": "Returns the specified gateway.",
- "description": "
**Note:** This API requires gateway admin permissions.
**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).",
+ "description": "\n## Permissions\n\nThe user must have gateway admin permissions.\n\n## Required scope\n\nDataset.ReadWrite.All or Dataset.Read.All\n\n## Limitations\n\nVirtual network (VNet) gateways aren't supported.\n\n######\n",
"operationId": "Gateways_GetGateway",
"consumes": [],
"produces": [
@@ -8415,8 +8559,8 @@
"tags": [
"Gateways"
],
- "summary": "Returns a list of datasources from the specified gateway.",
- "description": "
**Note:** This API requires gateway admin permissions.
**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).",
+ "summary": "Returns a list of data sources from the specified gateway.",
+ "description": "\n## Permissions\n\nThe user must have gateway admin permissions.\n\n## Required scope\n\nDataset.ReadWrite.All or Dataset.Read.All\n\n## Limitations\n\nVirtual network (VNet) gateways aren't supported.\n\n######\n",
"operationId": "Gateways_GetDatasources",
"consumes": [],
"produces": [
@@ -8477,8 +8621,8 @@
"tags": [
"Gateways"
],
- "summary": "Creates a new datasource on the specified gateway.",
- "description": "
**Note:** This API requires gateway admin permissions.
**Required scope**: Dataset.ReadWrite.AllTo set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app)To encrypt credentials, see [Encrypt credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)",
+ "summary": "Creates a new data source on the specified gateway.",
+ "description": "\nTo encrypt credentials, see [Configure credentials programmatically](/power-bi/developer/automation/configure-credentials).\n\n## Permissions\n\nThe user must have gateway admin permissions.\n\n## Required scope\n\nDataset.ReadWrite.All\n\n## Limitations\n\nVirtual network (VNet) gateways aren't supported.\n\n######\n",
"operationId": "Gateways_CreateDatasource",
"consumes": [
"application/json"
@@ -8565,8 +8709,8 @@
"tags": [
"Gateways"
],
- "summary": "Returns the specified datasource from the specified gateway.",
- "description": "
**Note:** This API requires gateway admin permissions.
**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).",
+ "summary": "Returns the specified data source from the specified gateway.",
+ "description": "\n## Permissions\n\nThe user must have gateway admin permissions.\n\n## Required scope\n\nDataset.ReadWrite.All or Dataset.Read.All\n\n## Limitations\n\nVirtual network (VNet) gateways aren't supported.\n\n######\n",
"operationId": "Gateways_GetDatasource",
"consumes": [],
"produces": [
@@ -8624,8 +8768,8 @@
"tags": [
"Gateways"
],
- "summary": "Deletes the specified datasource from the specified gateway.",
- "description": "
**Note:** This API requires gateway admin permissions.
**Required scope**: Dataset.ReadWrite.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).",
+ "summary": "Deletes the specified data source from the specified gateway.",
+ "description": "\n## Permissions\n\nThe user must have gateway admin permissions.\n\n## Required scope\n\nDataset.ReadWrite.All\n\n## Limitations\n\nVirtual network (VNet) gateways aren't supported.\n\n######\n",
"operationId": "Gateways_DeleteDatasource",
"consumes": [],
"produces": [],
@@ -8669,8 +8813,8 @@
"tags": [
"Gateways"
],
- "summary": "Updates the credentials of the specified datasource from the specified gateway.",
- "description": "
**Note:**This API requires gateway admin permissions.It is required to set *useEndUserOAuth2Credentials* to *False* when changing from SSO to other types, such as basic or OAuth2. See the [Basic credentials example](https://docs.microsoft.com/rest/api/power-bi/gateways/updatedatasource#basic-credentials-example).With OAuth2 token credentials, make sure the generated OAuth2 token audience was set correctly according to the datasource type.
**Required scope**: Dataset.ReadWrite.AllTo set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app)To encrypt credentials, see [Encrypt credentials](https://docs.microsoft.com/power-bi/developer/encrypt-credentials)",
+ "summary": "Updates the credentials of the specified data source from the specified gateway.",
+ "description": "\n- Set the parameter `useEndUserOAuth2Credentials` to `False` when changing from single sign-on to other credential types, such as **Basic** or **OAuth2**. See the [Basic credentials example](/rest/api/power-bi/gateways/update-datasource#basic-credentials-example).\n- To encrypt credentials, see [Configure credentials programmatically](/power-bi/developer/automation/configure-credentials).\n- For the **OAuth2** credential type, make sure the generated OAuth2 token audience was set correctly according to the data source type.\n- For **Extension** data sources, don't set `useCallerAADIdentity` to `true`. To set **OAuth2** credentials for other data sources, send the OAuth2 token in the payload as shown in the [OAuth2 credentials example](/rest/api/power-bi/gateways/update-datasource#oauth2-credentials-example).\n\n## Permissions\n\nThe user must have gateway admin permissions.\n\n## Required scope\n\nDataset.ReadWrite.All\n\n## Limitations\n\nVirtual network (VNet) gateways aren't supported.\n\n######\n",
"operationId": "Gateways_UpdateDatasource",
"consumes": [],
"produces": [],
@@ -8807,8 +8951,8 @@
"tags": [
"Gateways"
],
- "summary": "Checks the connectivity status of the specified datasource from the specified gateway.",
- "description": "
**Note:** This API requires gateway admin permissions.
**Required scope**: Dataset.ReadWrite.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).",
+ "summary": "Checks the connectivity status of the specified data source from the specified gateway.",
+ "description": "\n## Permissions\n\nThe user must have gateway admin permissions.\n\n## Required scope\n\nDataset.ReadWrite.All\n\n## Limitations\n\nVirtual network (VNet) gateways aren't supported.\n\n######\n",
"operationId": "Gateways_GetDatasourceStatus",
"consumes": [],
"produces": [
@@ -8868,8 +9012,8 @@
"tags": [
"Gateways"
],
- "summary": "Returns a list of users who have access to the specified datasource.",
- "description": "
**Note:** This API requires gateway admin permissions.
**Required scope**: Dataset.ReadWrite.All or Dataset.Read.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).",
+ "summary": "Returns a list of users who have access to the specified data source.",
+ "description": "\n## Permissions\n\nThe user must have gateway admin permissions.\n\n## Required scope\n\nDataset.ReadWrite.All or Dataset.Read.All\n\n## Limitations\n\nVirtual network (VNet) gateways aren't supported.\n\n######\n",
"operationId": "Gateways_GetDatasourceUsers",
"consumes": [],
"produces": [
@@ -8934,8 +9078,8 @@
"tags": [
"Gateways"
],
- "summary": "Grants or updates the permissions required to use the specified datasource for the specified user.",
- "description": "
**Note:** This API requires gateway admin permissions.
**Required scope**: Dataset.ReadWrite.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).",
+ "summary": "Grants or updates the permissions required to use the specified data source for the specified user.",
+ "description": "\n## Permissions\n\nThe user must have gateway admin permissions.\n\n## Required scope\n\nDataset.ReadWrite.All\n\n## Limitations\n\nVirtual network (VNet) gateways aren't supported.\n\n######\n",
"operationId": "Gateways_AddDatasourceUser",
"consumes": [
"application/json"
@@ -9010,8 +9154,8 @@
"tags": [
"Gateways"
],
- "summary": "Removes the specified user from the specified datasource.",
- "description": "
**Note:** This API requires gateway admin permissions.
**Required scope**: Dataset.ReadWrite.All
To set the permissions scope, see [Register an app](https://docs.microsoft.com/power-bi/developer/register-app).",
+ "summary": "Removes the specified user from the specified data source.",
+ "description": "\n## Permissions\n\nThe user must have gateway admin permissions.\n\n## Required scope\n\nDataset.ReadWrite.All\n\n## Limitations\n\nVirtual network (VNet) gateways aren't supported.\n\n######\n",
"operationId": "Gateways_DeleteDatasourceUser",
"consumes": [
"application/json"
@@ -13795,7 +13939,7 @@
"tags": [
"Admin"
],
- "summary": "Returns a list of datasets that have not been used within 30 days for the specified workspace (Preview).",
+ "summary": "Returns a list of datasets, reports, and dashboards that have not been used within 30 days for the specified workspace (Preview).",
"description": "\n## Permissions\n\n- The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) or authenticate using a service principal.\n- Delegated permissions are supported.\n\n## Required scope\n\nTenant.Read.All or Tenant.ReadWrite.All\n\n## Limitations\n\nMaximum 200 requests per hour.\n\n######\n",
"operationId": "Groups_GetUnusedArtifactsAsAdmin",
"consumes": [],
@@ -13810,6 +13954,13 @@
"required": true,
"type": "string",
"format": "uuid"
+ },
+ {
+ "name": "continuationToken",
+ "in": "query",
+ "description": "Token required to get the next chunk of the result set",
+ "required": false,
+ "type": "string"
}
],
"responses": {
@@ -13836,7 +13987,9 @@
"createdDateTime": "2020-09-01T22:40:52.197Z",
"lastAccessedDateTime": "2021-07-01T22:40:52.953Z"
}
- ]
+ ],
+ "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/unused?continuationToken='LDEsMTAwMDAwLDA%3D'",
+ "continuationToken": "LDEsMTAwMDAwLDA%3D"
}
}
}
@@ -15861,7 +16014,7 @@
"deprecated": false
}
},
- "/v1.0/myorg/admin/users/{userGraphId}/artifactAccess": {
+ "/v1.0/myorg/admin/users/{userId}/artifactAccess": {
"get": {
"tags": [
"Admin"
@@ -15875,12 +16028,11 @@
],
"parameters": [
{
- "name": "userGraphId",
+ "name": "userId",
"in": "path",
- "description": "The graph ID of user",
+ "description": "The graph ID or UPN of user",
"required": true,
- "type": "string",
- "format": "uuid"
+ "type": "string"
},
{
"name": "continuationToken",
@@ -15901,7 +16053,7 @@
"x-ms-examples": {
"example": {
"parameters": {
- "userGraphId": "f089354e-8366-4e18-aea3-4cb4a3a50b48"
+ "userId": "f089354e-8366-4e18-aea3-4cb4a3a50b48"
},
"responses": {
"200": {
@@ -15930,7 +16082,7 @@
"Admin"
],
"summary": "Returns a list of subscriptions that the given user has subscribed to (Preview).",
- "description": "\n### userId\n- The UserId can be userGraphId or UserPrincipalName\n### Permissions\n\n- The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) or authenticate using a service principal.\n- Delegated permissions are supported.\n\n## Required scope\n\nTenant.Read.All or Tenant.ReadWrite.All\n\n## Limitations\n\nMaximum 200 requests per hour.\n\n######\n",
+ "description": "\n### Permissions\n\n- The user must have administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) or authenticate using a service principal.\n- Delegated permissions are supported.\n\n## Required scope\n\nTenant.Read.All or Tenant.ReadWrite.All\n\n## Limitations\n\nMaximum 200 requests per hour.\n\n######\n",
"operationId": "Users_GetUserSubscriptionsAsAdmin",
"consumes": [],
"produces": [
@@ -15940,10 +16092,9 @@
{
"name": "userId",
"in": "path",
- "description": "The graph ID of user or User Principal Name of the user",
+ "description": "The graph ID or UPN of user",
"required": true,
- "type": "string",
- "format": "uuid"
+ "type": "string"
},
{
"name": "continuationToken",
@@ -15964,7 +16115,7 @@
"x-ms-examples": {
"example": {
"parameters": {
- "userGraphId": "f089354e-8366-4e18-aea3-4cb4a3a50b48"
+ "userId": "f089354e-8366-4e18-aea3-4cb4a3a50b48"
},
"responses": {
"200": {
@@ -20213,6 +20364,55 @@
}
}
},
+ "DatasetUserAccess": {
+ "required": [
+ "identifier",
+ "principalType",
+ "accessRight"
+ ],
+ "description": "A Power BI user access right entry for a dataset",
+ "properties": {
+ "accessRight": {
+ "type": "string",
+ "description": "(Required) The access right a user has for the dataset",
+ "enum": [
+ "Read",
+ "ReadReshare",
+ "ReadExplore",
+ "ReadReshareExplore"
+ ],
+ "x-ms-enum": {
+ "name": "DatasetUserAccessRightEntry",
+ "modelAsExtensible": true,
+ "values": [
+ {
+ "value": "Read",
+ "description": "Grants Read access to content in dataset"
+ },
+ {
+ "value": "ReadReshare",
+ "description": "Grants Read and Reshare access to content in dataset"
+ },
+ {
+ "value": "ReadExplore",
+ "description": "Grants Read and Explore access to content in dataset"
+ },
+ {
+ "value": "ReadReshareExplore",
+ "description": "Grants Read, Reshare and Explore access to content in dataset"
+ }
+ ]
+ }
+ },
+ "identifier": {
+ "type": "string",
+ "description": "For principal type `User`, enter *UPN*. Otherwise provide the [object ID](/power-bi/developer/embedded/embedded-troubleshoot#what-is-the-difference-between-application-object-id-and-principal-object-id) of the principal."
+ },
+ "principalType": {
+ "$ref": "#/definitions/PrincipalType"
+ }
+ }
+ },
"DataflowUser": {
"required": [
"dataflowUserAccessRight"
@@ -20693,6 +20893,28 @@
"id": {
"type": "string",
"description": "The dataset ID"
+ },
+ "xmlaPermissions": {
+ "type": "string",
+ "description": "XMLA Permissions",
+ "enum": [
+ "Off",
+ "ReadOnly"
+ ],
+ "x-ms-enum": {
+ "name": "XmlaPermissions",
+ "modelAsExtensible": true,
+ "values": [
+ {
+ "value": "Off",
+ "description": "Indicates that the generated embed token doesn't grant access permissions to the dataset's XMLA endpoint."
+ },
+ {
+ "value": "ReadOnly",
+ "description": "Indicates that the generated embed token grants Read access permissions to the dataset's XMLA endpoint."
+ }
+ ]
+ }
}
}
},
@@ -21156,7 +21378,7 @@
"properties": {
"Usage": {
"type": "integer",
- "description": "The token generation usage (in %) from the limitation on shared capacity"
+ "description": "Workspaces that aren’t assigned to a capacity get a limited amount of [embed tokens](/power-bi/developer/embedded/embed-tokens#embed-token), to allow experimenting with the APIs. The `Usage` value represents the percentage of embed tokens that have been consumed. The `Usage` value only applies to the **embed trial** feature. For more information, see [Development testing](/power-bi/developer/embedded/move-to-production#development-testing)."
}
}
},
@@ -21748,6 +21970,14 @@
"items": {
"$ref": "#/definitions/UnusedArtifactEntity"
}
+ },
+ "continuationUri": {
+ "type": "string",
+ "description": "The URI for the next chunk in the result set"
+ },
+ "continuationToken": {
+ "type": "string",
+ "description": "Token to get the next chunk of the result set"
}
}
},