MicrosoftGraph.Users.User (Microsoft Graph API Client v0.1.1)

Users API.

https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0

Link to this section Summary

Link to this section Functions

Link to this function

create_user(client, options \\ [])

Create a user.

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

example

Example:

iex> MicrosoftGraph.Users.User.create_user(client, params: %{
      "accountEnabled" => true,
      "displayName" => "Adele Vance",
      "mailNickname" => "AdeleV",
      "userPrincipalName" => "AdeleV@contoso.onmicrosoft.com",
      "passwordProfile" => %{
        "forceChangePasswordNextSignIn" => true,
        "password" => "password1234"
      }
    })
Link to this function

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

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

examples

Examples

iex> MicrosoftGraph.Users.User.get_user(client, "1234...")
{:ok, response}

# With query params
iex> MicrosoftGraph.Users.User.get_user(client, "1234...", params: %{
  "$select" => "displayName,id",
  "$filter" => "identities/any(c:c/issuerAssignedId eq 'j.smith@yahoo.com' and c/issuer eq 'My B2C tenant'"
})
{:ok, response}
Link to this function

list_users(client, options \\ [])

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

examples

Examples

iex> MicrosoftGraph.Users.User.list_users(client)
{:ok, response}

# Filter results
iex> MicrosoftGraph.Users.User.list_users(client, params: %{"$filter" => "userType eq 'Member' and accountEnabled eq true"})
{:ok, response}