public virtual Response UpdatePasswordCredentials(string objectId, PasswordCredentialsUpdateParameters parameters, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("ServicePrincipalsOperations.UpdatePasswordCredentials"); scope.Start(); try { return(RestClient.UpdatePasswordCredentials(objectId, parameters, cancellationToken)); } catch (Exception e) { scope.Failed(e); throw; } }
public virtual async Task <Response> UpdatePasswordCredentialsAsync(string applicationObjectId, PasswordCredentialsUpdateParameters parameters, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("ApplicationsClient.UpdatePasswordCredentials"); scope.Start(); try { return(await RestClient.UpdatePasswordCredentialsAsync(applicationObjectId, parameters, cancellationToken).ConfigureAwait(false)); } catch (Exception e) { scope.Failed(e); throw; } }
/// <summary> /// Update passwordCredentials associated with an application. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='applicationObjectId'> /// Application object ID. /// </param> /// <param name='parameters'> /// Parameters to update passwordCredentials of an existing application. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdatePasswordCredentialsAsync(this IApplicationsOperations operations, string applicationObjectId, PasswordCredentialsUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.UpdatePasswordCredentialsWithHttpMessagesAsync(applicationObjectId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Update passwordCredentials associated with an application. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='applicationObjectId'> /// Application object ID. /// </param> /// <param name='parameters'> /// Parameters to update passwordCredentials of an existing application. /// </param> public static void UpdatePasswordCredentials(this IApplicationsOperations operations, string applicationObjectId, PasswordCredentialsUpdateParameters parameters) { operations.UpdatePasswordCredentialsAsync(applicationObjectId, parameters).GetAwaiter().GetResult(); }
/// <summary> /// Updates the passwordCredentials associated with a service principal. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='objectId'> /// The object ID of the service principal. /// </param> /// <param name='parameters'> /// Parameters to update the passwordCredentials of an existing service /// principal. /// </param> public static void UpdatePasswordCredentials(this IServicePrincipalsOperations operations, string objectId, PasswordCredentialsUpdateParameters parameters) { operations.UpdatePasswordCredentialsAsync(objectId, parameters).GetAwaiter().GetResult(); }
/// <summary> /// Updates passwordCredentials associated with an existing service principal. /// Reference: /// https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#passwordcredential-type /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='objectId'> /// Object id to get service principal information. /// </param> /// <param name='parameters'> /// Parameters to update passwordCredentials of an existing service principal. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task UpdatePasswordCredentialsAsync(this IServicePrincipalsOperations operations, string objectId, PasswordCredentialsUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { await operations.UpdatePasswordCredentialsWithHttpMessagesAsync(objectId, parameters, null, cancellationToken).ConfigureAwait(false); }
/// <summary> /// Updates passwordCredentials associated with an existing service principal. /// Reference: /// https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#passwordcredential-type /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='objectId'> /// Object id to get service principal information. /// </param> /// <param name='parameters'> /// Parameters to update passwordCredentials of an existing service principal. /// </param> public static void UpdatePasswordCredentials(this IServicePrincipalsOperations operations, string objectId, PasswordCredentialsUpdateParameters parameters) { Task.Factory.StartNew(s => ((IServicePrincipalsOperations)s).UpdatePasswordCredentialsAsync(objectId, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }