/// <summary> /// Gets 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='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IEnumerable <PasswordCredential> > ListPasswordCredentialsAsync(this IServicePrincipalsOperations operations, string objectId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListPasswordCredentialsWithHttpMessagesAsync(objectId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }