GraphApi.Groups (GraphApi v1.0.0-rc.1)

Copy Markdown View Source

Operations on the /groups resource.

Examples

{:ok, %{"value" => groups}} = GraphApi.Groups.list()
{:ok, group} = GraphApi.Groups.get("group-id")
{:ok, %{"value" => members}} = GraphApi.Groups.list_members("group-id")

Summary

Functions

Adds an app role assignment to a group.

Adds an owner to a group.

Assigns licenses to a group.

Checks whether the group is a member of the specified groups.

Checks whether the group is a member of the specified objects.

Creates a new group.

Batch query variant of create/2.

Deletes a group.

Delta query for groups. Returns changes since the last sync.

Batch query variant of delta/1.

Gets a group by ID.

Returns all group IDs the group is a member of (transitive).

Returns all group and directory role IDs the group is a member of (transitive).

Batch query variant of get/2.

Lists groups in the organization.

Lists app role assignments for a group.

Lists groups and directory roles the group is a member of.

Lists members of a group.

Lists owners of a group.

Lists resource-specific permission grants on a group.

Batch query variant of list/1.

Lists groups and directory roles the group is a transitive member of.

Lists transitive members of a group.

Delta query for group membership. Returns member changes since the last sync.

Removes an app role assignment from a group.

Removes a member from a group.

Removes an owner from a group.

Renews a group's expiration.

Batch query variant of renew/2.

Functions

add_app_role_assignment(group_id, attrs, opts \\ [])

@spec add_app_role_assignment(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, term()}

Adds an app role assignment to a group.

add_app_role_assignment_query(group_id, attrs, opts \\ [])

@spec add_app_role_assignment_query(String.t(), map(), keyword()) ::
  GraphApi.Batch.Request.t()

Batch query variant of add_app_role_assignment/3.

add_member(group_id, member_id, opts \\ [])

@spec add_member(String.t(), String.t(), keyword()) :: :ok | {:error, term()}

Adds a member to a group.

The member_id should be the directory object ID of the user or service principal.

add_member_query(group_id, member_id, opts \\ [])

@spec add_member_query(String.t(), String.t(), keyword()) ::
  GraphApi.Batch.Request.t()

Batch query variant of add_member/3.

add_owner(group_id, owner_id, opts \\ [])

@spec add_owner(String.t(), String.t(), keyword()) :: :ok | {:error, term()}

Adds an owner to a group.

The owner_id should be the directory object ID of the user.

add_owner_query(group_id, owner_id, opts \\ [])

@spec add_owner_query(String.t(), String.t(), keyword()) :: GraphApi.Batch.Request.t()

Batch query variant of add_owner/3.

assign_license(group_id, attrs, opts \\ [])

@spec assign_license(String.t(), map(), keyword()) :: {:ok, map()} | {:error, term()}

Assigns licenses to a group.

assign_license_query(group_id, attrs, opts \\ [])

@spec assign_license_query(String.t(), map(), keyword()) :: GraphApi.Batch.Request.t()

Batch query variant of assign_license/3.

check_member_groups(group_id, attrs, opts \\ [])

@spec check_member_groups(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, term()}

Checks whether the group is a member of the specified groups.

check_member_groups_query(group_id, attrs, opts \\ [])

@spec check_member_groups_query(String.t(), map(), keyword()) ::
  GraphApi.Batch.Request.t()

Batch query variant of check_member_groups/3.

check_member_objects(group_id, attrs, opts \\ [])

@spec check_member_objects(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, term()}

Checks whether the group is a member of the specified objects.

check_member_objects_query(group_id, attrs, opts \\ [])

@spec check_member_objects_query(String.t(), map(), keyword()) ::
  GraphApi.Batch.Request.t()

Batch query variant of check_member_objects/3.

create(attrs, opts \\ [])

@spec create(
  map(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Creates a new group.

create_query(attrs, opts \\ [])

@spec create_query(
  map(),
  keyword()
) :: GraphApi.Batch.Request.t()

Batch query variant of create/2.

delete(group_id, opts \\ [])

@spec delete(
  String.t(),
  keyword()
) :: :ok | {:error, term()}

Deletes a group.

delete_query(group_id, opts \\ [])

@spec delete_query(
  String.t(),
  keyword()
) :: GraphApi.Batch.Request.t()

Batch query variant of delete/2.

delta(opts \\ [])

@spec delta(keyword()) :: {:ok, GraphApi.Delta.delta_page()} | {:error, term()}

Delta query for groups. Returns changes since the last sync.

See GraphApi.Delta for details.

delta_query(opts \\ [])

@spec delta_query(keyword()) :: GraphApi.Batch.Request.t()

Batch query variant of delta/1.

get(group_id, opts \\ [])

@spec get(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Gets a group by ID.

get_member_groups(group_id, attrs, opts \\ [])

@spec get_member_groups(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, term()}

Returns all group IDs the group is a member of (transitive).

get_member_groups_query(group_id, attrs, opts \\ [])

@spec get_member_groups_query(String.t(), map(), keyword()) ::
  GraphApi.Batch.Request.t()

Batch query variant of get_member_groups/3.

get_member_objects(group_id, attrs, opts \\ [])

@spec get_member_objects(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, term()}

Returns all group and directory role IDs the group is a member of (transitive).

get_member_objects_query(group_id, attrs, opts \\ [])

@spec get_member_objects_query(String.t(), map(), keyword()) ::
  GraphApi.Batch.Request.t()

Batch query variant of get_member_objects/3.

get_query(group_id, opts \\ [])

@spec get_query(
  String.t(),
  keyword()
) :: GraphApi.Batch.Request.t()

Batch query variant of get/2.

list(opts \\ [])

@spec list(keyword()) :: {:ok, map()} | {:error, term()}

Lists groups in the organization.

list_app_role_assignments(group_id, opts \\ [])

@spec list_app_role_assignments(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Lists app role assignments for a group.

list_app_role_assignments_query(group_id, opts \\ [])

@spec list_app_role_assignments_query(
  String.t(),
  keyword()
) :: GraphApi.Batch.Request.t()

Batch query variant of list_app_role_assignments/2.

list_member_of(group_id, opts \\ [])

@spec list_member_of(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Lists groups and directory roles the group is a member of.

list_member_of_query(group_id, opts \\ [])

@spec list_member_of_query(
  String.t(),
  keyword()
) :: GraphApi.Batch.Request.t()

Batch query variant of list_member_of/2.

list_members(group_id, opts \\ [])

@spec list_members(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Lists members of a group.

list_members_query(group_id, opts \\ [])

@spec list_members_query(
  String.t(),
  keyword()
) :: GraphApi.Batch.Request.t()

Batch query variant of list_members/2.

list_owners(group_id, opts \\ [])

@spec list_owners(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Lists owners of a group.

list_owners_query(group_id, opts \\ [])

@spec list_owners_query(
  String.t(),
  keyword()
) :: GraphApi.Batch.Request.t()

Batch query variant of list_owners/2.

list_permission_grants(group_id, opts \\ [])

@spec list_permission_grants(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Lists resource-specific permission grants on a group.

list_permission_grants_query(group_id, opts \\ [])

@spec list_permission_grants_query(
  String.t(),
  keyword()
) :: GraphApi.Batch.Request.t()

Batch query variant of list_permission_grants/2.

list_query(opts \\ [])

@spec list_query(keyword()) :: GraphApi.Batch.Request.t()

Batch query variant of list/1.

list_transitive_member_of(group_id, opts \\ [])

@spec list_transitive_member_of(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Lists groups and directory roles the group is a transitive member of.

list_transitive_member_of_query(group_id, opts \\ [])

@spec list_transitive_member_of_query(
  String.t(),
  keyword()
) :: GraphApi.Batch.Request.t()

Batch query variant of list_transitive_member_of/2.

list_transitive_members(group_id, opts \\ [])

@spec list_transitive_members(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

Lists transitive members of a group.

list_transitive_members_query(group_id, opts \\ [])

@spec list_transitive_members_query(
  String.t(),
  keyword()
) :: GraphApi.Batch.Request.t()

Batch query variant of list_transitive_members/2.

members_delta(group_id, opts \\ [])

@spec members_delta(
  String.t(),
  keyword()
) :: {:ok, GraphApi.Delta.delta_page()} | {:error, term()}

Delta query for group membership. Returns member changes since the last sync.

members_delta_query(group_id, opts \\ [])

@spec members_delta_query(
  String.t(),
  keyword()
) :: GraphApi.Batch.Request.t()

Batch query variant of members_delta/2.

remove_app_role_assignment(group_id, assignment_id, opts \\ [])

@spec remove_app_role_assignment(String.t(), String.t(), keyword()) ::
  :ok | {:error, term()}

Removes an app role assignment from a group.

remove_app_role_assignment_query(group_id, assignment_id, opts \\ [])

@spec remove_app_role_assignment_query(String.t(), String.t(), keyword()) ::
  GraphApi.Batch.Request.t()

Batch query variant of remove_app_role_assignment/3.

remove_member(group_id, member_id, opts \\ [])

@spec remove_member(String.t(), String.t(), keyword()) :: :ok | {:error, term()}

Removes a member from a group.

remove_member_query(group_id, member_id, opts \\ [])

@spec remove_member_query(String.t(), String.t(), keyword()) ::
  GraphApi.Batch.Request.t()

Batch query variant of remove_member/3.

remove_owner(group_id, owner_id, opts \\ [])

@spec remove_owner(String.t(), String.t(), keyword()) :: :ok | {:error, term()}

Removes an owner from a group.

remove_owner_query(group_id, owner_id, opts \\ [])

@spec remove_owner_query(String.t(), String.t(), keyword()) ::
  GraphApi.Batch.Request.t()

Batch query variant of remove_owner/3.

renew(group_id, opts \\ [])

@spec renew(
  String.t(),
  keyword()
) :: :ok | {:error, term()}

Renews a group's expiration.

renew_query(group_id, opts \\ [])

@spec renew_query(
  String.t(),
  keyword()
) :: GraphApi.Batch.Request.t()

Batch query variant of renew/2.

update(group_id, attrs, opts \\ [])

@spec update(String.t(), map(), keyword()) :: {:ok, map()} | :ok | {:error, term()}

Updates a group.

update_query(group_id, attrs, opts \\ [])

@spec update_query(String.t(), map(), keyword()) :: GraphApi.Batch.Request.t()

Batch query variant of update/3.