Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
532 changes: 528 additions & 4 deletions src/SDKs/Graph.RBAC/Graph.RBAC/Generated/ApplicationsOperations.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public static void Patch(this IApplicationsOperations operations, string applica
/// <param name='applicationObjectId'>
/// The object ID of the application for which to get owners.
/// </param>
public static IEnumerable<DirectoryObject> ListOwners(this IApplicationsOperations operations, string applicationObjectId)
public static IPage<DirectoryObject> ListOwners(this IApplicationsOperations operations, string applicationObjectId)
{
return operations.ListOwnersAsync(applicationObjectId).GetAwaiter().GetResult();
}
Expand All @@ -228,7 +228,7 @@ public static IEnumerable<DirectoryObject> ListOwners(this IApplicationsOperatio
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<DirectoryObject>> ListOwnersAsync(this IApplicationsOperations operations, string applicationObjectId, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<IPage<DirectoryObject>> ListOwnersAsync(this IApplicationsOperations operations, string applicationObjectId, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListOwnersWithHttpMessagesAsync(applicationObjectId, null, cancellationToken).ConfigureAwait(false))
{
Expand All @@ -249,7 +249,7 @@ public static IEnumerable<DirectoryObject> 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.
/// </param>
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();
}
Expand All @@ -270,11 +270,48 @@ public static void AddOwner(this IApplicationsOperations operations, string appl
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
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();
}

/// <summary>
/// Remove a member from owners.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='applicationObjectId'>
/// The object ID of the application from which to remove the owner.
/// </param>
/// <param name='ownerObjectId'>
/// Owner object id
/// </param>
public static void RemoveOwner(this IApplicationsOperations operations, string applicationObjectId, string ownerObjectId)
{
operations.RemoveOwnerAsync(applicationObjectId, ownerObjectId).GetAwaiter().GetResult();
}

/// <summary>
/// Remove a member from owners.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='applicationObjectId'>
/// The object ID of the application from which to remove the owner.
/// </param>
/// <param name='ownerObjectId'>
/// Owner object id
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
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();
}

/// <summary>
/// Get the keyCredentials associated with an application.
/// </summary>
Expand Down Expand Up @@ -417,6 +454,40 @@ public static void UpdatePasswordCredentials(this IApplicationsOperations operat
(await operations.UpdatePasswordCredentialsWithHttpMessagesAsync(applicationObjectId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
}

/// <summary>
/// Gets an object id for a given application id from the current tenant.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='applicationID'>
/// The application ID.
/// </param>
public static ServicePrincipalObjectResult GetServicePrincipalsIdByAppId(this IApplicationsOperations operations, string applicationID)
{
return operations.GetServicePrincipalsIdByAppIdAsync(applicationID).GetAwaiter().GetResult();
}

/// <summary>
/// Gets an object id for a given application id from the current tenant.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='applicationID'>
/// The application ID.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<ServicePrincipalObjectResult> GetServicePrincipalsIdByAppIdAsync(this IApplicationsOperations operations, string applicationID, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetServicePrincipalsIdByAppIdWithHttpMessagesAsync(applicationID, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Gets a list of applications from the current tenant.
/// </summary>
Expand Down Expand Up @@ -451,5 +522,47 @@ public static IPage<Application> ListNext(this IApplicationsOperations operation
}
}

/// <summary>
/// Directory objects that are owners of the application.
/// </summary>
/// <remarks>
/// The owners are a set of non-admin users who are allowed to modify this
/// object.
/// </remarks>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
public static IPage<DirectoryObject> ListOwnersNext(this IApplicationsOperations operations, string nextPageLink)
{
return operations.ListOwnersNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
/// Directory objects that are owners of the application.
/// </summary>
/// <remarks>
/// The owners are a set of non-admin users who are allowed to modify this
/// object.
/// </remarks>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<DirectoryObject>> ListOwnersNextAsync(this IApplicationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListOwnersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

}
}
Loading