msg
is an Elixir library for accessing Microsoft 365 data using the Microsoft Graph API.
This library is designed for applications that use client credentials (application-only).
Documentation can be found at https://hexdocs.com/msg.
This package is available in Hex, and can be installed by adding msg
to your list of dependencies in mix.exs
:
def deps do
[
{:msg, "~> 0.1.0"}
]
end
creds = %{
client_id: System.get_env("MICROSOFT_CLIENT_ID"),
client_secret: System.get_env("MICROSOFT_CLIENT_SECRET"),
tenant_id: System.get_env("MICROSOFT_TENANT_ID")
}
client = Msg.Client.new(creds)
{:ok, %{"value" => users}} = Msg.Users.list(client)
- Built on top of Req for HTTP requests
- OAuth2 client credentials flow via oauth2
MIT License. See LICENSE for details.