Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps a Microsoft Graph client for Entra bulk-fetch operations.
func NewClient ¶
func NewClient(graph *msgraphsdk.GraphServiceClient, opts ...Option) *Client
NewClient creates an entrasync client using an existing Graph service client. The caller is responsible for creating and managing the Graph client's lifecycle.
func (*Client) FetchGroupMembers ¶
FetchGroupMembers returns enabled member user IDs for the group's transitive membership.
func (*Client) FetchGroups ¶
FetchGroups returns security enabled groups.
func (*Client) FetchUsers ¶
FetchUsers returns enabled member users.
type Option ¶
type Option func(*Client)
Option configures optional Client behaviour.
func WithGroupMemberConcurrency ¶
WithGroupMemberConcurrency overrides the default parallelism (8) used when fetching group members during Snapshot. Values <= 0 are ignored.
func WithTransitiveMemberships ¶
func WithTransitiveMemberships() Option
WithTransitiveMemberships fetches transitive group memberships during Snapshot. Without this option, Snapshot.Members is nil.
func WithUserFields ¶
WithUserFields requests additional user properties from Graph beyond the default set (id, displayName, userPrincipalName). Fields not requested are left as zero values on User.
type Snapshot ¶
type Snapshot struct {
Users []User
Groups []Group
Members map[uuid.UUID][]uuid.UUID // group ID → member IDs
}
Snapshot holds all users, groups, and group memberships fetched from Entra.
type User ¶
type User struct {
// Always fetched
ID uuid.UUID
DisplayName string
UPN string
// Fetched only when requested via WithUserFields; zero-value otherwise.
Department string
MailNickname string
OfficeLocation string
EmployeeID string
CompanyName string
}
User is an Entra user record returned by Graph.