Exemple #1
0
 /// <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='nextLink'>
 /// Next link for the list operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <ServicePrincipal> > ListNextAsync(this IServicePrincipalsOperations operations, string nextLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #2
0

        
Exemple #3
0
 /// <summary>
 /// Gets service principal information from the directory.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='objectId'>
 /// The object ID of the service principal to get.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServicePrincipal> GetAsync(this IServicePrincipalsOperations operations, string objectId, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(objectId, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #4
0
 /// <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>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <ServicePrincipal> > ListAsync(this IServicePrincipalsOperations operations, ODataQuery <ServicePrincipal> odataQuery = default(ODataQuery <ServicePrincipal>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(odataQuery, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #5
0
 /// <summary>
 /// Creates a service principal in the directory.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// Parameters to create a service principal.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ServicePrincipal> CreateAsync(this IServicePrincipalsOperations operations, ServicePrincipalCreateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateWithHttpMessagesAsync(parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #6
0
 /// <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(((IServicePrincipalsOperations)operations).ListAsync(odataQuery).GetAwaiter().GetResult());
 }
Exemple #7
0
 /// <summary>
 /// Gets 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(Task.Factory.StartNew(s => ((IServicePrincipalsOperations)s).ListAsync(odataQuery), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Exemple #8
0
 /// <summary>
 /// Get entities from servicePrincipals
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='consistencyLevel'>
 /// Indicates the requested consistency level. Documentation URL:
 /// https://developer.microsoft.com/en-us/office/blogs/microsoft-graph-advanced-queries-for-directory-objects-are-now-generally-available/
 /// </param>
 /// <param name='top'>
 /// Show only the first n items
 /// </param>
 /// <param name='skip'>
 /// Skip the first n items
 /// </param>
 /// <param name='search'>
 /// Search items by search phrases
 /// </param>
 /// <param name='filter'>
 /// Filter items by property values
 /// </param>
 /// <param name='count'>
 /// Include count of items
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ListServicePrincipalOKResponse> ListServicePrincipalAsync(this IServicePrincipalsOperations operations, string consistencyLevel = default(string), int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListServicePrincipalWithHttpMessagesAsync(consistencyLevel, top, skip, search, filter, count, orderby, select, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #9
0
 /// <summary>
 /// Update entity in servicePrincipals
 /// </summary>
 /// <remarks>
 /// Represents an Azure Active Directory object. The directoryObject type is
 /// the base type for many other directory entity types.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='servicePrincipalId'>
 /// key: id of servicePrincipal
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task UpdateServicePrincipalAsync(this IServicePrincipalsOperations operations, string servicePrincipalId, MicrosoftGraphServicePrincipal body, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateServicePrincipalWithHttpMessagesAsync(servicePrincipalId, body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemple #10
0
 /// <summary>
 /// Get entity from servicePrincipals by key
 /// </summary>
 /// <remarks>
 /// Represents an Azure Active Directory object. The directoryObject type is
 /// the base type for many other directory entity types.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='servicePrincipalId'>
 /// key: id of servicePrincipal
 /// </param>
 /// <param name='consistencyLevel'>
 /// Indicates the requested consistency level. Documentation URL:
 /// https://developer.microsoft.com/en-us/office/blogs/microsoft-graph-advanced-queries-for-directory-objects-are-now-generally-available/
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MicrosoftGraphServicePrincipal> GetServicePrincipalAsync(this IServicePrincipalsOperations operations, string servicePrincipalId, string consistencyLevel = default(string), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetServicePrincipalWithHttpMessagesAsync(servicePrincipalId, consistencyLevel, select, expand, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #11
0
 /// <summary>
 /// Delete entity from servicePrincipals
 /// </summary>
 /// <remarks>
 /// Represents an Azure Active Directory object. The directoryObject type is
 /// the base type for many other directory entity types.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='servicePrincipalId'>
 /// key: id of servicePrincipal
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteServicePrincipalAsync(this IServicePrincipalsOperations operations, string servicePrincipalId, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteServicePrincipalWithHttpMessagesAsync(servicePrincipalId, ifMatch, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemple #12
0
 /// <summary>
 /// Add new entity to servicePrincipals
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <MicrosoftGraphServicePrincipal> CreateServicePrincipalAsync(this IServicePrincipalsOperations operations, MicrosoftGraphServicePrincipal body, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateServicePrincipalWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemple #13
0
 /// <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>
 public static IEnumerable <PasswordCredential> ListPasswordCredentials(this IServicePrincipalsOperations operations, string objectId)
 {
     return(operations.ListPasswordCredentialsAsync(objectId).GetAwaiter().GetResult());
 }
Exemple #14
0
 /// <summary>
 /// Gets service principal information from the directory.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='objectId'>
 /// The object ID of the service principal to get.
 /// </param>
 public static ServicePrincipal Get(this IServicePrincipalsOperations operations, string objectId)
 {
     return(operations.GetAsync(objectId).GetAwaiter().GetResult());
 }
Exemple #15
0
 /// <summary>
 /// Deletes a service principal from the directory.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='objectId'>
 /// The object ID of the service principal to delete.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IServicePrincipalsOperations operations, string objectId, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(objectId, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemple #16
0
 /// <summary>
 /// Deletes a service principal from the directory.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='objectId'>
 /// The object ID of the service principal to delete.
 /// </param>
 public static void Delete(this IServicePrincipalsOperations operations, string objectId)
 {
     operations.DeleteAsync(objectId).GetAwaiter().GetResult();
 }
 /// <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 <Models.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);
     }
 }
 /// <summary>
 /// Update the keyCredentials associated with a service principal.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='objectId'>
 /// The object ID for which to get service principal information.
 /// </param>
 /// <param name='value'>
 /// A collection of KeyCredentials.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task UpdateKeyCredentialsAsync(this IServicePrincipalsOperations operations, string objectId, IList <KeyCredential> value, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateKeyCredentialsWithHttpMessagesAsync(objectId, value, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemple #19
0
 /// <summary>
 /// Add new entity to servicePrincipals
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='body'>
 /// New entity
 /// </param>
 public static MicrosoftGraphServicePrincipal CreateServicePrincipal(this IServicePrincipalsOperations operations, MicrosoftGraphServicePrincipal body)
 {
     return(operations.CreateServicePrincipalAsync(body).GetAwaiter().GetResult());
 }
Exemple #20
0
 /// <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();
 }
Exemple #21
0
 /// <summary>
 /// Delete entity from servicePrincipals
 /// </summary>
 /// <remarks>
 /// Represents an Azure Active Directory object. The directoryObject type is
 /// the base type for many other directory entity types.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='servicePrincipalId'>
 /// key: id of servicePrincipal
 /// </param>
 /// <param name='ifMatch'>
 /// ETag
 /// </param>
 public static void DeleteServicePrincipal(this IServicePrincipalsOperations operations, string servicePrincipalId, string ifMatch = default(string))
 {
     operations.DeleteServicePrincipalAsync(servicePrincipalId, ifMatch).GetAwaiter().GetResult();
 }
Exemple #22
0
 /// <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>
 /// <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)).Dispose();
 }
Exemple #23
0
 /// <summary>
 /// Get entity from servicePrincipals by key
 /// </summary>
 /// <remarks>
 /// Represents an Azure Active Directory object. The directoryObject type is
 /// the base type for many other directory entity types.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='servicePrincipalId'>
 /// key: id of servicePrincipal
 /// </param>
 /// <param name='consistencyLevel'>
 /// Indicates the requested consistency level. Documentation URL:
 /// https://developer.microsoft.com/en-us/office/blogs/microsoft-graph-advanced-queries-for-directory-objects-are-now-generally-available/
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static MicrosoftGraphServicePrincipal GetServicePrincipal(this IServicePrincipalsOperations operations, string servicePrincipalId, string consistencyLevel = default(string), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.GetServicePrincipalAsync(servicePrincipalId, consistencyLevel, select, expand).GetAwaiter().GetResult());
 }
Exemple #24
0
 /// <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='nextLink'>
 /// Next link for the list operation.
 /// </param>
 public static IPage <ServicePrincipal> ListNext(this IServicePrincipalsOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink).GetAwaiter().GetResult());
 }
Exemple #25
0
 /// <summary>
 /// Update entity in servicePrincipals
 /// </summary>
 /// <remarks>
 /// Represents an Azure Active Directory object. The directoryObject type is
 /// the base type for many other directory entity types.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='servicePrincipalId'>
 /// key: id of servicePrincipal
 /// </param>
 /// <param name='body'>
 /// New property values
 /// </param>
 public static void UpdateServicePrincipal(this IServicePrincipalsOperations operations, string servicePrincipalId, MicrosoftGraphServicePrincipal body)
 {
     operations.UpdateServicePrincipalAsync(servicePrincipalId, body).GetAwaiter().GetResult();
 }
Exemple #26
0
 /// <summary>
 /// Creates a service principal in the directory.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// Parameters to create a service principal.
 /// </param>
 public static ServicePrincipal Create(this IServicePrincipalsOperations operations, ServicePrincipalCreateParameters parameters)
 {
     return(operations.CreateAsync(parameters).GetAwaiter().GetResult());
 }
Exemple #27
0
 /// <summary>
 /// Get entities from servicePrincipals
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='consistencyLevel'>
 /// Indicates the requested consistency level. Documentation URL:
 /// https://developer.microsoft.com/en-us/office/blogs/microsoft-graph-advanced-queries-for-directory-objects-are-now-generally-available/
 /// </param>
 /// <param name='top'>
 /// Show only the first n items
 /// </param>
 /// <param name='skip'>
 /// Skip the first n items
 /// </param>
 /// <param name='search'>
 /// Search items by search phrases
 /// </param>
 /// <param name='filter'>
 /// Filter items by property values
 /// </param>
 /// <param name='count'>
 /// Include count of items
 /// </param>
 /// <param name='orderby'>
 /// Order items by property values
 /// </param>
 /// <param name='select'>
 /// Select properties to be returned
 /// </param>
 /// <param name='expand'>
 /// Expand related entities
 /// </param>
 public static ListServicePrincipalOKResponse ListServicePrincipal(this IServicePrincipalsOperations operations, string consistencyLevel = default(string), int?top = default(int?), int?skip = default(int?), string search = default(string), string filter = default(string), bool?count = default(bool?), IList <string> orderby = default(IList <string>), IList <string> select = default(IList <string>), IList <string> expand = default(IList <string>))
 {
     return(operations.ListServicePrincipalAsync(consistencyLevel, top, skip, search, filter, count, orderby, select, expand).GetAwaiter().GetResult());
 }
Exemple #28
0
 /// <summary>
 /// Gets list of service principals from the current tenant.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextLink'>
 /// Next link for list operation.
 /// </param>
 public static IPage <ServicePrincipal> ListNext(this IServicePrincipalsOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew(s => ((IServicePrincipalsOperations)s).ListNextAsync(nextLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 internal ServicePrincipalsImpl(GraphRbacManager graphRbacManager)
 {
     this.innerCollection = graphRbacManager.Inner.ServicePrincipals;
     this.manager         = graphRbacManager;
 }
Exemple #30
0
 /// <summary>
 /// Creates a service principal in the  directory.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// Parameters to create a service principal.
 /// </param>
 public static ServicePrincipal Create(this IServicePrincipalsOperations operations, ServicePrincipalCreateParameters parameters)
 {
     return(Task.Factory.StartNew(s => ((IServicePrincipalsOperations)s).CreateAsync(parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }