Models Package Types
GroupMembership
type GroupMembership struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
}
GroupMembership represents a group that a user is a member of.
User
type User struct {
ID string `json:"id"`
UserPrincipalName string `json:"userPrincipalName"`
DisplayName string `json:"displayName,omitempty"`
GivenName string `json:"givenName,omitempty"`
Surname string `json:"surname,omitempty"`
Mail string `json:"mail,omitempty"`
JobTitle string `json:"jobTitle,omitempty"`
Department string `json:"department,omitempty"`
AccountEnabled bool `json:"accountEnabled,omitempty"`
CreationDateTime time.Time `json:"createdDateTime,omitempty"`
LastLoginDateTime time.Time `json:"lastLoginDateTime,omitempty"`
GroupMemberships []GroupMembership `json:"groupMemberships,omitempty"`
// Add other fields as needed
}
User represents a user object returned by the Microsoft Graph API.
UserResponse
type UserResponse struct {
Value []User `json:"value"`
ODataNextLink string `json:"@odata.nextLink"`
}
UserResponse represents the response structure for user queries.
Group
type Group struct {
ID string `json:"id"`
DisplayName string `json:"displayName"`
Description string `json:"description,omitempty"`
MailEnabled bool `json:"mailEnabled"`
MailNickname string `json:"mailNickname"`
SecurityEnabled bool `json:"securityEnabled"`
GroupTypes []string `json:"groupTypes"`
MembershipRule string `json:"membershipRule,omitempty"`
MembershipRuleProcessingState string `json:"membershipRuleProcessingState,omitempty"`
// Add other fields as needed
}
Group represents a group object in Microsoft Graph.
GroupResponse
type GroupResponse struct {
ODataContext string `json:"@odata.context"`
ODataNextLink string `json:"@odata.nextLink"`
Value []Group `json:"value"`
}
GroupResponse represents the response from the Graph API for groups.
Last modified: 28 January 2025