MicrosoftGraph.Users.Org (Microsoft Graph API Client v0.1.5)

Link to this section Summary

Functions

Assign direct manager for given user.

List all managers recursively for given user.

List direct manager for given user.

List direct reports for given user.

Link to this section Functions

Link to this function

assign_manager(client, id, options \\ [])

Assign direct manager for given user.

https://learn.microsoft.com/en-us/graph/api/user-post-manager?view=graph-rest-1.0&tabs=http

examples

Examples

# $ref is passed in as the @odata.id
iex> MicrosoftGraph.Users.Org.assign_manager(client, "user_id",
  params: %{
    "@odata.id": "https://graph.microsoft.com/v1.0/users/6ea91a8d-e32e-41a1-b7bd-d2d185eed0e0"
  }
)
{:ok, response}
Link to this function

get_all_managers(client, id, options \\ [])

List all managers recursively for given user.

https://learn.microsoft.com/en-us/graph/api/user-list-manager?view=graph-rest-1.0&tabs=http

examples

Examples

# At a minimum, `$expand=manager($levels=max;)` is required
iex> MicrosoftGraph.Users.Org.get_manager(client, "user_id",
  params: %{"$expand" => "manager($levels=max;)"}
)
{:ok, response}

iex> MicrosoftGraph.Users.Org.get_manager(client, "user_id",
  params: %{
    "$expand" => "manager($levels=max;$select=id,displayName)",
    "$select" => "id,displayName",
    "$count" => true
  }
)
{:ok, response}
Link to this function

get_manager(client, id, options \\ [])

List direct manager for given user.

https://learn.microsoft.com/en-us/graph/api/user-list-manager?view=graph-rest-1.0&tabs=http

examples

Examples

iex> MicrosoftGraph.Users.Org.get_manager(client, "user_id")
{:ok, response}
Link to this function

list_direct_reports(client, id, options \\ [])

List direct reports for given user.

https://learn.microsoft.com/en-us/graph/api/user-list-directreports?view=graph-rest-1.0&tabs=http

examples

Examples

iex> MicrosoftGraph.Users.Org.list_direct_reports(client, "user_id")
{:ok, response}