Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func OAuthClient ¶
OAuthClient returns an authenticated httpClient using the provided credentials.
*Specific to the OAuth2 client credentials grant flow implemented by the Microsoft Identity Platform* The scopeURL is always concatenated with /.default.
From Microsoft Graph API documentation (https://docs.microsoft.com/en-us/graph/auth-v2-service): For Microsoft Graph, the value is https://graph.microsoft.com/.default. This value informs the Microsoft identity platform endpoint that of all the application permissions you have configured for your app, it should issue a token for the ones associated with the resource you want to use.
Types ¶
type Client ¶
type Client struct { BaseURL *url.URL UserAgent string Users *UsersService // contains filtered or unexported fields }
A Client handles communication with the Microsoft Graph REST API.
func NewClient ¶
NewClient creates a Client using the provided httpClient. If nil is provided, a default httpClient with a default timeout value is created. Note that the default client has no way of authenticating itself against the Microsoft Graph API. A convenience function is provided just for that: NewClientAuthenticated.
func NewClientAuthenticated ¶
func NewClientAuthenticated(c *Credentials) *Client
NewClientAuthenticated creates an authenticated Client.
type Credentials ¶
Credentials are used by OAuthClient.
type User ¶
type User struct { BusinessPhones []string `json:"businessPhones"` DisplayName string `json:"displayName"` GivenName string `json:"givenName"` ID string `json:"id"` JobTitle string `json:"jobTitle"` Mail string `json:"mail"` MobilePhone string `json:"mobilePhone"` OfficeLocation string `json:"officeLocation"` PreferredLanguage string `json:"preferredLanguage"` Surname string `json:"surname"` UserPrincipalName string `json:"userPrincipalName"` }
User represents a Azure AD work or school user account or a Microsoft account in Microsoft Graph.
type UsersService ¶
type UsersService service
UsersService handles communication with the users related methods of the Microsoft Graph API.