diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ApplicationsOperations.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ApplicationsOperations.cs
index 1639fd849900..688a1a601903 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ApplicationsOperations.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ApplicationsOperations.cs
@@ -976,7 +976,7 @@ internal ApplicationsOperations(GraphRbacManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListOwnersWithHttpMessagesAsync(string applicationObjectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListOwnersWithHttpMessagesAsync(string applicationObjectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (applicationObjectId == null)
{
@@ -1099,7 +1099,7 @@ internal ApplicationsOperations(GraphRbacManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -1112,7 +1112,7 @@ internal ApplicationsOperations(GraphRbacManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -1159,7 +1159,7 @@ internal ApplicationsOperations(GraphRbacManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task AddOwnerWithHttpMessagesAsync(string applicationObjectId, ApplicationAddOwnerParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task AddOwnerWithHttpMessagesAsync(string applicationObjectId, AddOwnerParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (applicationObjectId == null)
{
@@ -1311,6 +1311,176 @@ internal ApplicationsOperations(GraphRbacManagementClient client)
return _result;
}
+ ///
+ /// Remove a member from owners.
+ ///
+ ///
+ /// The object ID of the application from which to remove the owner.
+ ///
+ ///
+ /// Owner object id
+ ///
+ ///
+ /// 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 RemoveOwnerWithHttpMessagesAsync(string applicationObjectId, string ownerObjectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (applicationObjectId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "applicationObjectId");
+ }
+ if (ownerObjectId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "ownerObjectId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.TenantID == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.TenantID");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("applicationObjectId", applicationObjectId);
+ tracingParameters.Add("ownerObjectId", ownerObjectId);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "RemoveOwner", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{tenantID}/applications/{applicationObjectId}/$links/owners/{ownerObjectId}").ToString();
+ _url = _url.Replace("{applicationObjectId}", System.Uri.EscapeDataString(applicationObjectId));
+ _url = _url.Replace("{ownerObjectId}", System.Uri.EscapeDataString(ownerObjectId));
+ _url = _url.Replace("{tenantID}", System.Uri.EscapeDataString(Client.TenantID));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ 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;
+ // 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 != 204)
+ {
+ var ex = new GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ GraphError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ 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 AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// Get the keyCredentials associated with an application.
///
@@ -2207,5 +2377,177 @@ internal ApplicationsOperations(GraphRbacManagementClient client)
return _result;
}
+ ///
+ /// Directory objects that are owners of the application.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify this
+ /// object.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// 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>> ListOwnersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListOwnersNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ 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;
+ // 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 GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ GraphError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ 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 AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
}
}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ApplicationsOperationsExtensions.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ApplicationsOperationsExtensions.cs
index 316875063879..61e9316e3175 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ApplicationsOperationsExtensions.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ApplicationsOperationsExtensions.cs
@@ -207,7 +207,7 @@ public static void Patch(this IApplicationsOperations operations, string applica
///
/// The object ID of the application for which to get owners.
///
- public static IEnumerable ListOwners(this IApplicationsOperations operations, string applicationObjectId)
+ public static IPage ListOwners(this IApplicationsOperations operations, string applicationObjectId)
{
return operations.ListOwnersAsync(applicationObjectId).GetAwaiter().GetResult();
}
@@ -228,7 +228,7 @@ public static IEnumerable ListOwners(this IApplicationsOperatio
///
/// The cancellation token.
///
- public static async Task> ListOwnersAsync(this IApplicationsOperations operations, string applicationObjectId, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> ListOwnersAsync(this IApplicationsOperations operations, string applicationObjectId, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListOwnersWithHttpMessagesAsync(applicationObjectId, null, cancellationToken).ConfigureAwait(false))
{
@@ -249,7 +249,7 @@ public static IEnumerable ListOwners(this IApplicationsOperatio
/// The URL of the owner object, such as
/// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd.
///
- public static void AddOwner(this IApplicationsOperations operations, string applicationObjectId, ApplicationAddOwnerParameters parameters)
+ public static void AddOwner(this IApplicationsOperations operations, string applicationObjectId, AddOwnerParameters parameters)
{
operations.AddOwnerAsync(applicationObjectId, parameters).GetAwaiter().GetResult();
}
@@ -270,11 +270,48 @@ public static void AddOwner(this IApplicationsOperations operations, string appl
///
/// The cancellation token.
///
- public static async Task AddOwnerAsync(this IApplicationsOperations operations, string applicationObjectId, ApplicationAddOwnerParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task AddOwnerAsync(this IApplicationsOperations operations, string applicationObjectId, AddOwnerParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
{
(await operations.AddOwnerWithHttpMessagesAsync(applicationObjectId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Remove a member from owners.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The object ID of the application from which to remove the owner.
+ ///
+ ///
+ /// Owner object id
+ ///
+ public static void RemoveOwner(this IApplicationsOperations operations, string applicationObjectId, string ownerObjectId)
+ {
+ operations.RemoveOwnerAsync(applicationObjectId, ownerObjectId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Remove a member from owners.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The object ID of the application from which to remove the owner.
+ ///
+ ///
+ /// Owner object id
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task RemoveOwnerAsync(this IApplicationsOperations operations, string applicationObjectId, string ownerObjectId, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.RemoveOwnerWithHttpMessagesAsync(applicationObjectId, ownerObjectId, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Get the keyCredentials associated with an application.
///
@@ -451,5 +488,47 @@ public static IPage ListNext(this IApplicationsOperations operation
}
}
+ ///
+ /// Directory objects that are owners of the application.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify this
+ /// object.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListOwnersNext(this IApplicationsOperations operations, string nextPageLink)
+ {
+ return operations.ListOwnersNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Directory objects that are owners of the application.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify this
+ /// object.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListOwnersNextAsync(this IApplicationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListOwnersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
}
}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/DeletedApplicationsOperations.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/DeletedApplicationsOperations.cs
new file mode 100644
index 000000000000..691591437f7b
--- /dev/null
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/DeletedApplicationsOperations.cs
@@ -0,0 +1,760 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Graph.RBAC
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Http;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// DeletedApplicationsOperations operations.
+ ///
+ internal partial class DeletedApplicationsOperations : IServiceOperations, IDeletedApplicationsOperations
+ {
+ ///
+ /// Initializes a new instance of the DeletedApplicationsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal DeletedApplicationsOperations(GraphRbacManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the GraphRbacManagementClient
+ ///
+ public GraphRbacManagementClient Client { get; private set; }
+
+ ///
+ /// Restores the deleted application in the directory.
+ ///
+ ///
+ /// Application object ID.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// 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> RestoreWithHttpMessagesAsync(string objectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (objectId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "objectId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.TenantID == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.TenantID");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("objectId", objectId);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Restore", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{tenantID}/deletedApplications/{objectId}/restore").ToString();
+ _url = _url.Replace("{objectId}", System.Uri.EscapeDataString(objectId));
+ _url = _url.Replace("{tenantID}", System.Uri.EscapeDataString(Client.TenantID));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // 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 (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ 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;
+ // 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 GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ GraphError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ 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 AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets a list of deleted applications in the directory.
+ ///
+ ///
+ /// The filter to apply to the operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// 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>> ListWithHttpMessagesAsync(string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.TenantID == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.TenantID");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("filter", filter);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{tenantID}/deletedApplications").ToString();
+ _url = _url.Replace("{tenantID}", System.Uri.EscapeDataString(Client.TenantID));
+ List _queryParameters = new List();
+ if (filter != null)
+ {
+ _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter)));
+ }
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ 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;
+ // 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 GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ GraphError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ 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 AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Hard-delete an application.
+ ///
+ ///
+ /// Application object ID.
+ ///
+ ///
+ /// 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 HardDeleteWithHttpMessagesAsync(string applicationObjectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (applicationObjectId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "applicationObjectId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.TenantID == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.TenantID");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("applicationObjectId", applicationObjectId);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "HardDelete", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{tenantID}/deletedApplications/{applicationObjectId}").ToString();
+ _url = _url.Replace("{applicationObjectId}", System.Uri.EscapeDataString(applicationObjectId));
+ _url = _url.Replace("{tenantID}", System.Uri.EscapeDataString(Client.TenantID));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ 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;
+ // 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 != 204)
+ {
+ var ex = new GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ GraphError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ 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 AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Gets a list of deleted applications in the directory.
+ ///
+ ///
+ /// Next link for the list operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextLink");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.TenantID == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.TenantID");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextLink", nextLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{tenantID}/{nextLink}").ToString();
+ _url = _url.Replace("{nextLink}", nextLink);
+ _url = _url.Replace("{tenantID}", System.Uri.EscapeDataString(Client.TenantID));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ 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;
+ // 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 GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ GraphError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ 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 AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ }
+}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/DeletedApplicationsOperationsExtensions.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/DeletedApplicationsOperationsExtensions.cs
new file mode 100644
index 000000000000..d834c0fd2d59
--- /dev/null
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/DeletedApplicationsOperationsExtensions.cs
@@ -0,0 +1,158 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Graph.RBAC
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for DeletedApplicationsOperations.
+ ///
+ public static partial class DeletedApplicationsOperationsExtensions
+ {
+ ///
+ /// Restores the deleted application in the directory.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Application object ID.
+ ///
+ public static Application Restore(this IDeletedApplicationsOperations operations, string objectId)
+ {
+ return operations.RestoreAsync(objectId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Restores the deleted application in the directory.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Application object ID.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task RestoreAsync(this IDeletedApplicationsOperations operations, string objectId, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.RestoreWithHttpMessagesAsync(objectId, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets a list of deleted applications in the directory.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The filter to apply to the operation.
+ ///
+ public static IPage List(this IDeletedApplicationsOperations operations, string filter = default(string))
+ {
+ return operations.ListAsync(filter).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a list of deleted applications in the directory.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The filter to apply to the operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IDeletedApplicationsOperations operations, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(filter, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Hard-delete an application.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Application object ID.
+ ///
+ public static void HardDelete(this IDeletedApplicationsOperations operations, string applicationObjectId)
+ {
+ operations.HardDeleteAsync(applicationObjectId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Hard-delete an application.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Application object ID.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task HardDeleteAsync(this IDeletedApplicationsOperations operations, string applicationObjectId, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.HardDeleteWithHttpMessagesAsync(applicationObjectId, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Gets a list of deleted applications in the directory.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Next link for the list operation.
+ ///
+ public static IPage ListNext(this IDeletedApplicationsOperations operations, string nextLink)
+ {
+ return operations.ListNextAsync(nextLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a list of deleted applications in the directory.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Next link for the list operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this IDeletedApplicationsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/GraphRbacManagementClient.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/GraphRbacManagementClient.cs
index bde81dab5004..62721dc992ac 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/GraphRbacManagementClient.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/GraphRbacManagementClient.cs
@@ -75,15 +75,20 @@ public partial class GraphRbacManagementClient : ServiceClient
- /// Gets the IObjectsOperations.
+ /// Gets the ISignedInUserOperations.
///
- public virtual IObjectsOperations Objects { get; private set; }
+ public virtual ISignedInUserOperations SignedInUser { get; private set; }
///
/// Gets the IApplicationsOperations.
///
public virtual IApplicationsOperations Applications { get; private set; }
+ ///
+ /// Gets the IDeletedApplicationsOperations.
+ ///
+ public virtual IDeletedApplicationsOperations DeletedApplications { get; private set; }
+
///
/// Gets the IGroupsOperations.
///
@@ -99,6 +104,11 @@ public partial class GraphRbacManagementClient : ServiceClient
public virtual IUsersOperations Users { get; private set; }
+ ///
+ /// Gets the IObjectsOperations.
+ ///
+ public virtual IObjectsOperations Objects { get; private set; }
+
///
/// Gets the IDomainsOperations.
///
@@ -350,11 +360,13 @@ public GraphRbacManagementClient(System.Uri baseUri, ServiceClientCredentials cr
///
private void Initialize()
{
- Objects = new ObjectsOperations(this);
+ SignedInUser = new SignedInUserOperations(this);
Applications = new ApplicationsOperations(this);
+ DeletedApplications = new DeletedApplicationsOperations(this);
Groups = new GroupsOperations(this);
ServicePrincipals = new ServicePrincipalsOperations(this);
Users = new UsersOperations(this);
+ Objects = new ObjectsOperations(this);
Domains = new DomainsOperations(this);
OAuth2 = new OAuth2Operations(this);
BaseUri = new System.Uri("https://graph.windows.net");
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/GroupsOperations.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/GroupsOperations.cs
index 054504ebe328..5bdb11f804e1 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/GroupsOperations.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/GroupsOperations.cs
@@ -996,7 +996,7 @@ internal GroupsOperations(GraphRbacManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> GetGroupMembersWithHttpMessagesAsync(string objectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> GetGroupMembersWithHttpMessagesAsync(string objectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (objectId == null)
{
@@ -1119,7 +1119,7 @@ internal GroupsOperations(GraphRbacManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -1132,7 +1132,7 @@ internal GroupsOperations(GraphRbacManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -1695,6 +1695,542 @@ internal GroupsOperations(GraphRbacManagementClient client)
return _result;
}
+ ///
+ /// Directory objects that are owners of the group.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify this
+ /// object.
+ ///
+ ///
+ /// The object ID of the group for which to get owners.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// 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>> ListOwnersWithHttpMessagesAsync(string objectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (objectId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "objectId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.TenantID == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.TenantID");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("objectId", objectId);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListOwners", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{tenantID}/groups/{objectId}/owners").ToString();
+ _url = _url.Replace("{objectId}", System.Uri.EscapeDataString(objectId));
+ _url = _url.Replace("{tenantID}", System.Uri.EscapeDataString(Client.TenantID));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ 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;
+ // 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 GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ GraphError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ 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 AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Add an owner to a group.
+ ///
+ ///
+ /// The object ID of the application to which to add the owner.
+ ///
+ ///
+ /// The URL of the owner object, such as
+ /// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd.
+ ///
+ ///
+ /// 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 AddOwnerWithHttpMessagesAsync(string objectId, AddOwnerParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (objectId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "objectId");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.TenantID == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.TenantID");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("objectId", objectId);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "AddOwner", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{tenantID}/groups/{objectId}/$links/owners").ToString();
+ _url = _url.Replace("{objectId}", System.Uri.EscapeDataString(objectId));
+ _url = _url.Replace("{tenantID}", System.Uri.EscapeDataString(Client.TenantID));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // 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 (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ 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(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 204)
+ {
+ var ex = new GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ GraphError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ 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 AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Remove a member from owners.
+ ///
+ ///
+ /// The object ID of the group from which to remove the owner.
+ ///
+ ///
+ /// Owner object id
+ ///
+ ///
+ /// 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 RemoveOwnerWithHttpMessagesAsync(string objectId, string ownerObjectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (objectId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "objectId");
+ }
+ if (ownerObjectId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "ownerObjectId");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.TenantID == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.TenantID");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("objectId", objectId);
+ tracingParameters.Add("ownerObjectId", ownerObjectId);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "RemoveOwner", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{tenantID}/groups/{objectId}/$links/owners/{ownerObjectId}").ToString();
+ _url = _url.Replace("{objectId}", System.Uri.EscapeDataString(objectId));
+ _url = _url.Replace("{ownerObjectId}", System.Uri.EscapeDataString(ownerObjectId));
+ _url = _url.Replace("{tenantID}", System.Uri.EscapeDataString(Client.TenantID));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("DELETE");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ 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;
+ // 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 != 204)
+ {
+ var ex = new GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ GraphError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ 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 AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// Gets a list of groups for the current tenant.
///
@@ -1904,7 +2440,7 @@ internal GroupsOperations(GraphRbacManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> GetGroupMembersNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> GetGroupMembersNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (nextLink == null)
{
@@ -2027,7 +2563,179 @@ internal GroupsOperations(GraphRbacManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse>();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ // Deserialize Response
+ if ((int)_statusCode == 200)
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ }
+ catch (JsonException ex)
+ {
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
+ }
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
+ ///
+ /// Directory objects that are owners of the group.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify this
+ /// object.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// 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>> ListOwnersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (nextPageLink == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("nextPageLink", nextPageLink);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListOwnersNext", tracingParameters);
+ }
+ // Construct URL
+ string _url = "{nextLink}";
+ _url = _url.Replace("{nextLink}", nextPageLink);
+ List _queryParameters = new List();
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ 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;
+ // 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 GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ GraphError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ 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 AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -2040,7 +2748,7 @@ internal GroupsOperations(GraphRbacManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/GroupsOperationsExtensions.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/GroupsOperationsExtensions.cs
index 4d1639765e86..31ff9e83a1f7 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/GroupsOperationsExtensions.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/GroupsOperationsExtensions.cs
@@ -213,7 +213,7 @@ public static ADGroup Create(this IGroupsOperations operations, GroupCreateParam
///
/// The object ID of the group whose members should be retrieved.
///
- public static IPage GetGroupMembers(this IGroupsOperations operations, string objectId)
+ public static IPage GetGroupMembers(this IGroupsOperations operations, string objectId)
{
return operations.GetGroupMembersAsync(objectId).GetAwaiter().GetResult();
}
@@ -230,7 +230,7 @@ public static IPage GetGroupMembers(this IGroupsOperations operations
///
/// The cancellation token.
///
- public static async Task> GetGroupMembersAsync(this IGroupsOperations operations, string objectId, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> GetGroupMembersAsync(this IGroupsOperations operations, string objectId, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetGroupMembersWithHttpMessagesAsync(objectId, null, cancellationToken).ConfigureAwait(false))
{
@@ -345,6 +345,124 @@ public static IEnumerable GetMemberGroups(this IGroupsOperations operati
}
}
+ ///
+ /// Directory objects that are owners of the group.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify this
+ /// object.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The object ID of the group for which to get owners.
+ ///
+ public static IPage ListOwners(this IGroupsOperations operations, string objectId)
+ {
+ return operations.ListOwnersAsync(objectId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Directory objects that are owners of the group.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify this
+ /// object.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The object ID of the group for which to get owners.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListOwnersAsync(this IGroupsOperations operations, string objectId, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListOwnersWithHttpMessagesAsync(objectId, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Add an owner to a group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The object ID of the application to which to add the owner.
+ ///
+ ///
+ /// The URL of the owner object, such as
+ /// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd.
+ ///
+ public static void AddOwner(this IGroupsOperations operations, string objectId, AddOwnerParameters parameters)
+ {
+ operations.AddOwnerAsync(objectId, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Add an owner to a group.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The object ID of the application to which to add the owner.
+ ///
+ ///
+ /// The URL of the owner object, such as
+ /// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task AddOwnerAsync(this IGroupsOperations operations, string objectId, AddOwnerParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.AddOwnerWithHttpMessagesAsync(objectId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Remove a member from owners.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The object ID of the group from which to remove the owner.
+ ///
+ ///
+ /// Owner object id
+ ///
+ public static void RemoveOwner(this IGroupsOperations operations, string objectId, string ownerObjectId)
+ {
+ operations.RemoveOwnerAsync(objectId, ownerObjectId).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Remove a member from owners.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The object ID of the group from which to remove the owner.
+ ///
+ ///
+ /// Owner object id
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task RemoveOwnerAsync(this IGroupsOperations operations, string objectId, string ownerObjectId, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.RemoveOwnerWithHttpMessagesAsync(objectId, ownerObjectId, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Gets a list of groups for the current tenant.
///
@@ -388,7 +506,7 @@ public static IPage ListNext(this IGroupsOperations operations, string
///
/// Next link for the list operation.
///
- public static IPage GetGroupMembersNext(this IGroupsOperations operations, string nextLink)
+ public static IPage GetGroupMembersNext(this IGroupsOperations operations, string nextLink)
{
return operations.GetGroupMembersNextAsync(nextLink).GetAwaiter().GetResult();
}
@@ -405,7 +523,7 @@ public static IPage GetGroupMembersNext(this IGroupsOperations operat
///
/// The cancellation token.
///
- public static async Task> GetGroupMembersNextAsync(this IGroupsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task> GetGroupMembersNextAsync(this IGroupsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetGroupMembersNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false))
{
@@ -413,5 +531,47 @@ public static IPage GetGroupMembersNext(this IGroupsOperations operat
}
}
+ ///
+ /// Directory objects that are owners of the group.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify this
+ /// object.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListOwnersNext(this IGroupsOperations operations, string nextPageLink)
+ {
+ return operations.ListOwnersNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Directory objects that are owners of the group.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify this
+ /// object.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListOwnersNextAsync(this IGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListOwnersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
}
}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IApplicationsOperations.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IApplicationsOperations.cs
index 687e891cf35b..e803d41498b7 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IApplicationsOperations.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IApplicationsOperations.cs
@@ -156,7 +156,7 @@ public partial interface IApplicationsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListOwnersWithHttpMessagesAsync(string applicationObjectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListOwnersWithHttpMessagesAsync(string applicationObjectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Add an owner to an application.
///
@@ -179,7 +179,29 @@ public partial interface IApplicationsOperations
///
/// Thrown when a required parameter is null
///
- Task AddOwnerWithHttpMessagesAsync(string applicationObjectId, ApplicationAddOwnerParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task AddOwnerWithHttpMessagesAsync(string applicationObjectId, AddOwnerParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Remove a member from owners.
+ ///
+ ///
+ /// The object ID of the application from which to remove the owner.
+ ///
+ ///
+ /// Owner object id
+ ///
+ ///
+ /// 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 RemoveOwnerWithHttpMessagesAsync(string applicationObjectId, string ownerObjectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Get the keyCredentials associated with an application.
///
@@ -291,5 +313,31 @@ public partial interface IApplicationsOperations
/// Thrown when a required parameter is null
///
Task>> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Directory objects that are owners of the application.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify
+ /// this object.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListOwnersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IDeletedApplicationsOperations.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IDeletedApplicationsOperations.cs
new file mode 100644
index 000000000000..7cd37af9cf32
--- /dev/null
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IDeletedApplicationsOperations.cs
@@ -0,0 +1,112 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Graph.RBAC
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// DeletedApplicationsOperations operations.
+ ///
+ public partial interface IDeletedApplicationsOperations
+ {
+ ///
+ /// Restores the deleted application in the directory.
+ ///
+ ///
+ /// Application object ID.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> RestoreWithHttpMessagesAsync(string objectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of deleted applications in the directory.
+ ///
+ ///
+ /// The filter to apply to the operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListWithHttpMessagesAsync(string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Hard-delete an application.
+ ///
+ ///
+ /// Application object ID.
+ ///
+ ///
+ /// 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 HardDeleteWithHttpMessagesAsync(string applicationObjectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a list of deleted applications in the directory.
+ ///
+ ///
+ /// Next link for the list operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IGraphRbacManagementClient.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IGraphRbacManagementClient.cs
index 0113e0bf71e4..304c21545be4 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IGraphRbacManagementClient.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IGraphRbacManagementClient.cs
@@ -70,15 +70,20 @@ public partial interface IGraphRbacManagementClient : System.IDisposable
///
- /// Gets the IObjectsOperations.
+ /// Gets the ISignedInUserOperations.
///
- IObjectsOperations Objects { get; }
+ ISignedInUserOperations SignedInUser { get; }
///
/// Gets the IApplicationsOperations.
///
IApplicationsOperations Applications { get; }
+ ///
+ /// Gets the IDeletedApplicationsOperations.
+ ///
+ IDeletedApplicationsOperations DeletedApplications { get; }
+
///
/// Gets the IGroupsOperations.
///
@@ -94,6 +99,11 @@ public partial interface IGraphRbacManagementClient : System.IDisposable
///
IUsersOperations Users { get; }
+ ///
+ /// Gets the IObjectsOperations.
+ ///
+ IObjectsOperations Objects { get; }
+
///
/// Gets the IDomainsOperations.
///
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IGroupsOperations.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IGroupsOperations.cs
index 38b48f20fed1..0dc24ce826f1 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IGroupsOperations.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IGroupsOperations.cs
@@ -157,7 +157,7 @@ public partial interface IGroupsOperations
///
/// Thrown when a required parameter is null
///
- Task>> GetGroupMembersWithHttpMessagesAsync(string objectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> GetGroupMembersWithHttpMessagesAsync(string objectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets group information from the directory.
///
@@ -226,6 +226,77 @@ public partial interface IGroupsOperations
///
Task>> GetMemberGroupsWithHttpMessagesAsync(string objectId, GroupGetMemberGroupsParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Directory objects that are owners of the group.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify
+ /// this object.
+ ///
+ ///
+ /// The object ID of the group for which to get owners.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListOwnersWithHttpMessagesAsync(string objectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Add an owner to a group.
+ ///
+ ///
+ /// The object ID of the application to which to add the owner.
+ ///
+ ///
+ /// The URL of the owner object, such as
+ /// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd.
+ ///
+ ///
+ /// 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 AddOwnerWithHttpMessagesAsync(string objectId, AddOwnerParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Remove a member from owners.
+ ///
+ ///
+ /// The object ID of the group from which to remove the owner.
+ ///
+ ///
+ /// Owner object id
+ ///
+ ///
+ /// 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 RemoveOwnerWithHttpMessagesAsync(string objectId, string ownerObjectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Gets a list of groups for the current tenant.
///
///
@@ -268,6 +339,32 @@ public partial interface IGroupsOperations
///
/// Thrown when a required parameter is null
///
- Task>> GetGroupMembersNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> GetGroupMembersNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Directory objects that are owners of the group.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify
+ /// this object.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListOwnersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IOAuth2Operations.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IOAuth2Operations.cs
index b922c67fd5cb..8e032b10e73d 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IOAuth2Operations.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IOAuth2Operations.cs
@@ -24,7 +24,8 @@ namespace Microsoft.Azure.Graph.RBAC
public partial interface IOAuth2Operations
{
///
- /// Queries OAuth2 permissions for the relevant SP ObjectId of an app.
+ /// Queries OAuth2 permissions grants for the relevant SP ObjectId of
+ /// an app.
///
///
/// This is the Service Principal ObjectId associated with the app
@@ -44,13 +45,13 @@ public partial interface IOAuth2Operations
///
/// Thrown when a required parameter is null
///
- Task> GetWithHttpMessagesAsync(string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> GetWithHttpMessagesAsync(string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Grants OAuth2 permissions for the relevant resource Ids of an app.
///
///
/// The relevant app Service Principal Object Id and the Service
- /// Principal Objecit Id you want to grant.
+ /// Principal Object Id you want to grant.
///
///
/// The headers that will be added to request.
@@ -67,6 +68,49 @@ public partial interface IOAuth2Operations
///
/// Thrown when a required parameter is null
///
- Task> PostWithHttpMessagesAsync(Permissions body = default(Permissions), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> GrantWithHttpMessagesAsync(Permissions body = default(Permissions), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete a OAuth2 permission grant for the relevant resource Ids of
+ /// an app.
+ ///
+ ///
+ /// The object ID of a permission grant.
+ ///
+ ///
+ /// 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 DeleteWithHttpMessagesAsync(string objectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Queries OAuth2 permissions grants for the relevant SP ObjectId of
+ /// an app.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> GetNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IObjectsOperations.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IObjectsOperations.cs
index f7518e68248b..ae6619ae5d51 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IObjectsOperations.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IObjectsOperations.cs
@@ -24,26 +24,9 @@ namespace Microsoft.Azure.Graph.RBAC
public partial interface IObjectsOperations
{
///
- /// Gets the details for the currently logged-in user.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetCurrentUserWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Gets AD group membership for the specified AD object IDs.
+ /// Gets the directory objects specified in a list of object IDs. You
+ /// can also specify which resource collections (users, groups, etc.)
+ /// should be searched by specifying the optional types parameter.
///
///
/// Objects filtering parameters.
@@ -63,7 +46,7 @@ public partial interface IObjectsOperations
///
/// Thrown when a required parameter is null
///
- Task>> GetObjectsByObjectIdsWithHttpMessagesAsync(GetObjectsParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> GetObjectsByObjectIdsWithHttpMessagesAsync(GetObjectsParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Gets AD group membership for the specified AD object IDs.
///
@@ -85,6 +68,6 @@ public partial interface IObjectsOperations
///
/// Thrown when a required parameter is null
///
- Task>> GetObjectsByObjectIdsNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> GetObjectsByObjectIdsNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IServicePrincipalsOperations.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IServicePrincipalsOperations.cs
index 20ca1efe753d..4e4ff5b7b5e8 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IServicePrincipalsOperations.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/IServicePrincipalsOperations.cs
@@ -69,6 +69,28 @@ public partial interface IServicePrincipalsOperations
///
Task>> ListWithHttpMessagesAsync(ODataQuery odataQuery = default(ODataQuery), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Updates a service principal in the directory.
+ ///
+ ///
+ /// The object ID of the service principal to delete.
+ ///
+ ///
+ /// Parameters to update a service principal.
+ ///
+ ///
+ /// 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 UpdateWithHttpMessagesAsync(string objectId, ServicePrincipalUpdateParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Deletes a service principal from the directory.
///
///
@@ -135,7 +157,7 @@ public partial interface IServicePrincipalsOperations
///
/// Thrown when a required parameter is null
///
- Task>> ListOwnersWithHttpMessagesAsync(string objectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task>> ListOwnersWithHttpMessagesAsync(string objectId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Get the keyCredentials associated with the specified service
/// principal.
@@ -251,5 +273,31 @@ public partial interface IServicePrincipalsOperations
/// Thrown when a required parameter is null
///
Task>> ListNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Directory objects that are owners of this service principal.
+ ///
+ ///
+ /// The owners are a set of non-admin users who are allowed to modify
+ /// this object.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListOwnersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ISignedInUserOperations.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ISignedInUserOperations.cs
new file mode 100644
index 000000000000..f1e841e0f970
--- /dev/null
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ISignedInUserOperations.cs
@@ -0,0 +1,87 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Graph.RBAC
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SignedInUserOperations operations.
+ ///
+ public partial interface ISignedInUserOperations
+ {
+ ///
+ /// Gets the details for the currently logged-in user.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get the list of directory objects that are owned by the user.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListOwnedObjectsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get the list of directory objects that are owned by the user.
+ ///
+ ///
+ /// Next link for the list operation.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task>> ListOwnedObjectsNextWithHttpMessagesAsync(string nextLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/AADObject.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/AADObject.cs
deleted file mode 100644
index 6fff9f0e0d3a..000000000000
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/AADObject.cs
+++ /dev/null
@@ -1,213 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Graph.RBAC.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// The properties of an Active Directory object.
- ///
- public partial class AADObject
- {
- ///
- /// Initializes a new instance of the AADObject class.
- ///
- public AADObject()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the AADObject class.
- ///
- /// Unmatched properties from the
- /// message are deserialized this collection
- /// The ID of the object.
- /// The type of AAD object.
- /// The display name of the object.
- /// The principal name of the
- /// object.
- /// The primary email address of the object.
- /// Whether the AAD object is
- /// mail-enabled.
- /// The mail alias for the user.
- /// Whether the AAD object is
- /// security-enabled.
- /// The sign-in name of the object.
- /// A collection of service
- /// principal names associated with the object.
- /// The user type of the object.
- /// A two letter country code (ISO standard
- /// 3166). Required for users that will be assigned licenses due to
- /// legal requirement to check for availability of services in
- /// countries. Examples include: "US", "JP", and "GB".
- /// The application ID.
- /// The application permissions.
- /// Whether the application is be
- /// available to other tenants.
- /// A collection of URIs for the
- /// application.
- /// A collection of reply URLs for the
- /// application.
- /// The home page of the application.
- public AADObject(IDictionary additionalProperties = default(IDictionary), string objectId = default(string), string objectType = default(string), string displayName = default(string), string userPrincipalName = default(string), string mail = default(string), bool? mailEnabled = default(bool?), string mailNickname = default(string), bool? securityEnabled = default(bool?), string signInName = default(string), IList servicePrincipalNames = default(IList), string userType = default(string), string usageLocation = default(string), string appId = default(string), IList appPermissions = default(IList), bool? availableToOtherTenants = default(bool?), IList identifierUris = default(IList), IList replyUrls = default(IList), string homepage = default(string))
- {
- AdditionalProperties = additionalProperties;
- ObjectId = objectId;
- ObjectType = objectType;
- DisplayName = displayName;
- UserPrincipalName = userPrincipalName;
- Mail = mail;
- MailEnabled = mailEnabled;
- MailNickname = mailNickname;
- SecurityEnabled = securityEnabled;
- SignInName = signInName;
- ServicePrincipalNames = servicePrincipalNames;
- UserType = userType;
- UsageLocation = usageLocation;
- AppId = appId;
- AppPermissions = appPermissions;
- AvailableToOtherTenants = availableToOtherTenants;
- IdentifierUris = identifierUris;
- ReplyUrls = replyUrls;
- Homepage = homepage;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets unmatched properties from the message are deserialized
- /// this collection
- ///
- [JsonExtensionData]
- public IDictionary AdditionalProperties { get; set; }
-
- ///
- /// Gets or sets the ID of the object.
- ///
- [JsonProperty(PropertyName = "objectId")]
- public string ObjectId { get; set; }
-
- ///
- /// Gets or sets the type of AAD object.
- ///
- [JsonProperty(PropertyName = "objectType")]
- public string ObjectType { get; set; }
-
- ///
- /// Gets or sets the display name of the object.
- ///
- [JsonProperty(PropertyName = "displayName")]
- public string DisplayName { get; set; }
-
- ///
- /// Gets or sets the principal name of the object.
- ///
- [JsonProperty(PropertyName = "userPrincipalName")]
- public string UserPrincipalName { get; set; }
-
- ///
- /// Gets or sets the primary email address of the object.
- ///
- [JsonProperty(PropertyName = "mail")]
- public string Mail { get; set; }
-
- ///
- /// Gets or sets whether the AAD object is mail-enabled.
- ///
- [JsonProperty(PropertyName = "mailEnabled")]
- public bool? MailEnabled { get; set; }
-
- ///
- /// Gets the mail alias for the user.
- ///
- [JsonProperty(PropertyName = "mailNickname")]
- public string MailNickname { get; private set; }
-
- ///
- /// Gets or sets whether the AAD object is security-enabled.
- ///
- [JsonProperty(PropertyName = "securityEnabled")]
- public bool? SecurityEnabled { get; set; }
-
- ///
- /// Gets or sets the sign-in name of the object.
- ///
- [JsonProperty(PropertyName = "signInName")]
- public string SignInName { get; set; }
-
- ///
- /// Gets or sets a collection of service principal names associated
- /// with the object.
- ///
- [JsonProperty(PropertyName = "servicePrincipalNames")]
- public IList ServicePrincipalNames { get; set; }
-
- ///
- /// Gets or sets the user type of the object.
- ///
- [JsonProperty(PropertyName = "userType")]
- public string UserType { get; set; }
-
- ///
- /// Gets a two letter country code (ISO standard 3166). Required for
- /// users that will be assigned licenses due to legal requirement to
- /// check for availability of services in countries. Examples include:
- /// "US", "JP", and "GB".
- ///
- [JsonProperty(PropertyName = "usageLocation")]
- public string UsageLocation { get; private set; }
-
- ///
- /// Gets the application ID.
- ///
- [JsonProperty(PropertyName = "appId")]
- public string AppId { get; private set; }
-
- ///
- /// Gets the application permissions.
- ///
- [JsonProperty(PropertyName = "appPermissions")]
- public IList AppPermissions { get; private set; }
-
- ///
- /// Gets whether the application is be available to other tenants.
- ///
- [JsonProperty(PropertyName = "availableToOtherTenants")]
- public bool? AvailableToOtherTenants { get; private set; }
-
- ///
- /// Gets a collection of URIs for the application.
- ///
- [JsonProperty(PropertyName = "identifierUris")]
- public IList IdentifierUris { get; private set; }
-
- ///
- /// Gets a collection of reply URLs for the application.
- ///
- [JsonProperty(PropertyName = "replyUrls")]
- public IList ReplyUrls { get; private set; }
-
- ///
- /// Gets the home page of the application.
- ///
- [JsonProperty(PropertyName = "homepage")]
- public string Homepage { get; private set; }
-
- }
-}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/ADGroup.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/ADGroup.cs
index 7f8831d6a221..2970e0d37ecd 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/ADGroup.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/ADGroup.cs
@@ -38,13 +38,19 @@ public ADGroup()
/// The time at which the directory
/// object was deleted.
/// The display name of the group.
+ /// Whether the group is mail-enabled. Must
+ /// be false. This is because only pure security groups can be created
+ /// using the Graph API.
+ /// The mail alias for the group.
/// Whether the group is
/// security-enable.
/// The primary email address of the group.
- public ADGroup(IDictionary additionalProperties = default(IDictionary), string objectId = default(string), System.DateTime? deletionTimestamp = default(System.DateTime?), string displayName = default(string), bool? securityEnabled = default(bool?), string mail = default(string))
+ public ADGroup(IDictionary additionalProperties = default(IDictionary), string objectId = default(string), System.DateTime? deletionTimestamp = default(System.DateTime?), string displayName = default(string), bool? mailEnabled = default(bool?), string mailNickname = default(string), bool? securityEnabled = default(bool?), string mail = default(string))
: base(additionalProperties, objectId, deletionTimestamp)
{
DisplayName = displayName;
+ MailEnabled = mailEnabled;
+ MailNickname = mailNickname;
SecurityEnabled = securityEnabled;
Mail = mail;
CustomInit();
@@ -61,6 +67,20 @@ public ADGroup()
[JsonProperty(PropertyName = "displayName")]
public string DisplayName { get; set; }
+ ///
+ /// Gets or sets whether the group is mail-enabled. Must be false. This
+ /// is because only pure security groups can be created using the Graph
+ /// API.
+ ///
+ [JsonProperty(PropertyName = "mailEnabled")]
+ public bool? MailEnabled { get; set; }
+
+ ///
+ /// Gets or sets the mail alias for the group.
+ ///
+ [JsonProperty(PropertyName = "mailNickname")]
+ public string MailNickname { get; set; }
+
///
/// Gets or sets whether the group is security-enable.
///
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/ApplicationAddOwnerParameters.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/AddOwnerParameters.cs
similarity index 86%
rename from src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/ApplicationAddOwnerParameters.cs
rename to src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/AddOwnerParameters.cs
index 778d701efd74..9b366a6943db 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/ApplicationAddOwnerParameters.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/AddOwnerParameters.cs
@@ -19,20 +19,18 @@ namespace Microsoft.Azure.Graph.RBAC.Models
///
/// Request parameters for adding a owner to an application.
///
- public partial class ApplicationAddOwnerParameters
+ public partial class AddOwnerParameters
{
///
- /// Initializes a new instance of the ApplicationAddOwnerParameters
- /// class.
+ /// Initializes a new instance of the AddOwnerParameters class.
///
- public ApplicationAddOwnerParameters()
+ public AddOwnerParameters()
{
CustomInit();
}
///
- /// Initializes a new instance of the ApplicationAddOwnerParameters
- /// class.
+ /// Initializes a new instance of the AddOwnerParameters class.
///
/// A owner object URL, such as
/// "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd",
@@ -41,7 +39,7 @@ public ApplicationAddOwnerParameters()
/// (user, application, servicePrincipal, group) to be added.
/// Unmatched properties from the
/// message are deserialized this collection
- public ApplicationAddOwnerParameters(string url, IDictionary additionalProperties = default(IDictionary))
+ public AddOwnerParameters(string url, IDictionary additionalProperties = default(IDictionary))
{
AdditionalProperties = additionalProperties;
Url = url;
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/AppRole.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/AppRole.cs
new file mode 100644
index 000000000000..c09ebae0515b
--- /dev/null
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/AppRole.cs
@@ -0,0 +1,112 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Graph.RBAC.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ public partial class AppRole
+ {
+ ///
+ /// Initializes a new instance of the AppRole class.
+ ///
+ public AppRole()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the AppRole class.
+ ///
+ /// Unique role identifier inside the appRoles
+ /// collection.
+ /// Specifies whether this app role
+ /// definition can be assigned to users and groups by setting to
+ /// 'User', or to other applications (that are accessing this
+ /// application in daemon service scenarios) by setting to
+ /// 'Application', or to both.
+ /// Permission help text that appears in the
+ /// admin app assignment and consent experiences.
+ /// Display name for the permission that
+ /// appears in the admin consent and app assignment
+ /// experiences.
+ /// When creating or updating a role
+ /// definition, this must be set to true (which is the default). To
+ /// delete a role, this must first be set to false. At that point, in a
+ /// subsequent call, this role may be removed.
+ /// Specifies the value of the roles claim that the
+ /// application should expect in the authentication and access
+ /// tokens.
+ public AppRole(string id = default(string), IList allowedMemberTypes = default(IList), string description = default(string), string displayName = default(string), bool? isEnabled = default(bool?), string value = default(string))
+ {
+ Id = id;
+ AllowedMemberTypes = allowedMemberTypes;
+ Description = description;
+ DisplayName = displayName;
+ IsEnabled = isEnabled;
+ Value = value;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets unique role identifier inside the appRoles collection.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ ///
+ /// Gets or sets specifies whether this app role definition can be
+ /// assigned to users and groups by setting to 'User', or to other
+ /// applications (that are accessing this application in daemon service
+ /// scenarios) by setting to 'Application', or to both.
+ ///
+ [JsonProperty(PropertyName = "allowedMemberTypes")]
+ public IList AllowedMemberTypes { get; set; }
+
+ ///
+ /// Gets or sets permission help text that appears in the admin app
+ /// assignment and consent experiences.
+ ///
+ [JsonProperty(PropertyName = "description")]
+ public string Description { get; set; }
+
+ ///
+ /// Gets or sets display name for the permission that appears in the
+ /// admin consent and app assignment experiences.
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; set; }
+
+ ///
+ /// Gets or sets when creating or updating a role definition, this must
+ /// be set to true (which is the default). To delete a role, this must
+ /// first be set to false. At that point, in a subsequent call, this
+ /// role may be removed.
+ ///
+ [JsonProperty(PropertyName = "isEnabled")]
+ public bool? IsEnabled { get; set; }
+
+ ///
+ /// Gets or sets specifies the value of the roles claim that the
+ /// application should expect in the authentication and access tokens.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public string Value { get; set; }
+
+ }
+}
diff --git a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/Application.cs b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/Application.cs
index 762b4fa22c24..0b880387dd54 100644
--- a/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/Application.cs
+++ b/src/SDKs/Graph.RBAC/Graph.RBAC/Generated/Models/Application.cs
@@ -37,29 +37,112 @@ public Application()
/// The time at which the directory
/// object was deleted.
/// The application ID.
+ /// A property on the application to
+ /// indicate if the application accepts other IDPs or not or partially
+ /// accepts.
+ /// Indicates that the application
+ /// supports pass through users who have no presence in the resource
+ /// tenant.
+ /// The url for the application logo image
+ /// stored in a CDN.
+ /// The collection of application roles that an
+ /// application may declare. These roles can be assigned to users,
+ /// groups or service principals.
/// The application permissions.
- /// Whether the application is be
+ /// Whether the application is
/// available to other tenants.
/// The display name of the
/// application.
+ /// A URL provided by the author of the
+ /// application to report errors when using the application.
+ /// The home page of the application.
/// A collection of URIs for the
/// application.
- /// A collection of reply URLs for the
+ /// urls with more informations of the
/// application.
- /// The home page of the application.
+ /// Specifies whether this
+ /// application supports device authentication without a user. The
+ /// default is false.
+ /// A collection of KeyCredential
+ /// objects.
+ /// Client applications that are
+ /// tied to this resource application. Consent to any of the known
+ /// client applications will result in implicit consent to the resource
+ /// application through a combined consent dialog (showing the OAuth
+ /// permission scopes required by the client and the resource).
+ /// the url of the logout page
/// Whether to allow implicit
/// grant flow for OAuth2
- public Application(IDictionary additionalProperties = default(IDictionary