public async Task <Microsoft.Azure.Management.ResourceManager.Fluent.Core.IPagedCollection <IServicePrincipal> > ListAsync(bool loadAllPages = true, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(await PagedCollection <IServicePrincipal, ServicePrincipalInner> .LoadPageWithWrapModelAsync(
                async (cancellation) => await innerCollection.ListAsync(null, cancellation),
                innerCollection.ListNextAsync,
                async (inner, cancellation) => await ((ServicePrincipalImpl)WrapModel(inner)).RefreshCredentialsAsync(cancellation),
                loadAllPages, cancellationToken));
 }
 /// <summary>
 /// Gets a list of service principals from the current tenant.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='odataQuery'>
 /// OData parameters to apply to the operation.
 /// </param>
 public static IPage <ServicePrincipal> List(this IServicePrincipalsOperations operations, ODataQuery <ServicePrincipal> odataQuery = default(ODataQuery <ServicePrincipal>))
 {
     return(operations.ListAsync(odataQuery).GetAwaiter().GetResult());
 }