Documentation
¶
Index ¶
- Constants
- Variables
- type APIApplication
- type AppRole
- type AppRoleAssignment
- type Application
- type Backend
- func (b *Backend) AddKey(id string, in KeyCredential) (KeyCredential, error)
- func (b *Backend) AddMember(groupID, memberID string) error
- func (b *Backend) AddOwner(id, ownerID string) error
- func (b *Backend) AddPassword(id string, in PasswordCredential) (PasswordCredential, error)
- func (b *Backend) AuthenticateClient(clientID, secret string) (string, bool, error)
- func (b *Backend) ByIDs(ids, types []string) ([]Object, error)
- func (b *Backend) CreateAppRoleAssignment(ownerID string, asResource bool, body map[string]json.RawMessage) (AppRoleAssignment, error)
- func (b *Backend) CreateApplication(body map[string]json.RawMessage) (Application, error)
- func (b *Backend) CreateGrant(body map[string]json.RawMessage) (OAuth2PermissionGrant, error)
- func (b *Backend) CreateGroup(body map[string]json.RawMessage) (Group, error)
- func (b *Backend) CreateServicePrincipal(body map[string]json.RawMessage) (ServicePrincipal, error)
- func (b *Backend) CreateUser(body map[string]json.RawMessage) (User, error)
- func (b *Backend) DeleteAppRoleAssignment(id, assignmentID string, asResource bool) error
- func (b *Backend) DeleteApplication(r Ref) error
- func (b *Backend) DeleteGrant(id string) error
- func (b *Backend) DeleteGroup(r Ref) error
- func (b *Backend) DeleteServicePrincipal(r Ref) error
- func (b *Backend) DeleteUser(r Ref) error
- func (b *Backend) GetApplication(r Ref) (Application, error)
- func (b *Backend) GetGroup(r Ref) (Group, error)
- func (b *Backend) GetObject(id string) (Object, error)
- func (b *Backend) GetServicePrincipal(r Ref) (ServicePrincipal, error)
- func (b *Backend) GetUser(r Ref) (User, error)
- func (b *Backend) ListAppRoleAssignments(id string, asResource bool) ([]AppRoleAssignment, error)
- func (b *Backend) ListApplications() []Application
- func (b *Backend) ListGrants() []OAuth2PermissionGrant
- func (b *Backend) ListGroups() []Group
- func (b *Backend) ListServicePrincipals() []ServicePrincipal
- func (b *Backend) ListUsers() []User
- func (b *Backend) MemberOf(id string, transitive bool) ([]Object, error)
- func (b *Backend) Members(id string) ([]Object, error)
- func (b *Backend) ObjectKind(id string) (string, bool)
- func (b *Backend) Owners(id string) ([]Object, error)
- func (b *Backend) PrincipalType(id string) (string, bool)
- func (b *Backend) RemoveKey(id, keyID string) error
- func (b *Backend) RemoveMember(groupID, memberID string) error
- func (b *Backend) RemoveOwner(id, ownerID string) error
- func (b *Backend) RemovePassword(id, keyID string) error
- func (b *Backend) Reset()
- func (b *Backend) Restore(ctx context.Context, data []byte) error
- func (b *Backend) Snapshot(ctx context.Context) []byte
- func (b *Backend) TenantID() string
- func (b *Backend) TransitiveMembers(id string) ([]Object, error)
- func (b *Backend) UpdateApplication(r Ref, body map[string]json.RawMessage) error
- func (b *Backend) UpdateGrant(id string, body map[string]json.RawMessage) error
- func (b *Backend) UpdateGroup(r Ref, body map[string]json.RawMessage) error
- func (b *Backend) UpdateServicePrincipal(r Ref, body map[string]json.RawMessage) error
- func (b *Backend) UpdateUser(r Ref, body map[string]json.RawMessage) error
- type ClientAuthError
- type ConfigProvider
- type Error
- type Group
- type Handler
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Shutdown(ctx context.Context)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- func (h *Handler) StartWorker(ctx context.Context) error
- type ImplicitGrantSettings
- type KeyCredential
- type OAuth2PermissionGrant
- type Object
- type Option
- type PasswordCredential
- type PasswordProfile
- type PermissionScope
- type PreAuthorizedApplication
- type Provider
- type RedirectFacet
- type Ref
- type RequiredResourceAccess
- type ResourceAccess
- type ServicePrincipal
- type Settings
- type User
- type WebApplication
Constants ¶
const DefaultDomain = "gopherstack.onmicrosoft.com"
DefaultDomain is the tenant's initial, default verified domain.
const DefaultPort = 10014
DefaultPort is the Microsoft Graph HTTPS listener.
const DefaultTenantID = "00000000-0000-0000-0000-000000000000"
DefaultTenantID is the dev tenant; it must equal --azure-arm-tenant-id for tokens to validate.
const MicrosoftGraphAppID = "00000003-0000-0000-c000-000000000000"
MicrosoftGraphAppID is the well-known application ID of the Microsoft Graph resource service principal.
Variables ¶
var ErrNilAppContext = errors.New("azuregraph: nil app context")
ErrNilAppContext is returned by Provider.Init for a nil AppContext.
Functions ¶
This section is empty.
Types ¶
type APIApplication ¶
type APIApplication struct {
AcceptMappedClaims *bool `json:"acceptMappedClaims"`
RequestedAccessTokenVersion *int `json:"requestedAccessTokenVersion"`
KnownClientApplications []string `json:"knownClientApplications"`
OAuth2PermissionScopes []PermissionScope `json:"oauth2PermissionScopes"`
PreAuthorizedApplications []PreAuthorizedApplication `json:"preAuthorizedApplications"`
}
APIApplication is the application's api facet.
type AppRole ¶
type AppRole struct {
ID string `json:"id"`
Description string `json:"description,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Origin string `json:"origin,omitempty"`
Value string `json:"value,omitempty"`
AllowedMemberTypes []string `json:"allowedMemberTypes"`
IsEnabled bool `json:"isEnabled"`
}
AppRole is an appRoles entry.
type AppRoleAssignment ¶
type AppRoleAssignment struct {
CreatedDateTime time.Time `json:"createdDateTime"`
ID string `json:"id"`
AppRoleID string `json:"appRoleId"`
PrincipalID string `json:"principalId"`
PrincipalType string `json:"principalType"`
PrincipalDisplayName string `json:"principalDisplayName"`
ResourceID string `json:"resourceId"`
ResourceDisplayName string `json:"resourceDisplayName"`
}
AppRoleAssignment grants an app role of a resource service principal to a principal.
type Application ¶
type Application struct {
CreatedDateTime time.Time `json:"createdDateTime"`
IsDeviceOnlyAuthSupported *bool `json:"isDeviceOnlyAuthSupported"`
ServiceManagementReference string `json:"serviceManagementReference,omitempty"`
Notes string `json:"notes,omitempty"`
ApplicationTemplateID string `json:"applicationTemplateId,omitempty"`
PublisherDomain string `json:"publisherDomain"`
SAMLMetadataURL string `json:"samlMetadataUrl,omitempty"`
DefaultRedirectURI string `json:"defaultRedirectUri,omitempty"`
AppID string `json:"appId"`
TokenEncryptionKeyID string `json:"tokenEncryptionKeyId,omitempty"`
ID string `json:"id"`
GroupMembershipClaims string `json:"groupMembershipClaims,omitempty"`
SignInAudience string `json:"signInAudience"`
UniqueName string `json:"uniqueName,omitempty"`
DisplayName string `json:"displayName"`
Description string `json:"description,omitempty"`
API APIApplication `json:"api"`
Certification json.RawMessage `json:"certification,omitempty"`
VerifiedPublisher json.RawMessage `json:"verifiedPublisher,omitempty"`
SPA RedirectFacet `json:"spa"`
DisabledByMicrosoftStatus json.RawMessage `json:"disabledByMicrosoftStatus,omitempty"`
AddIns json.RawMessage `json:"addIns,omitempty"`
ParentalControlSettings json.RawMessage `json:"parentalControlSettings,omitempty"`
Info json.RawMessage `json:"info,omitempty"`
OptionalClaims json.RawMessage `json:"optionalClaims,omitempty"`
AuthenticationBehaviors json.RawMessage `json:"authenticationBehaviors,omitempty"`
PublicClient RedirectFacet `json:"publicClient"`
IdentifierURIs []string `json:"identifierUris"`
Tags []string `json:"tags"`
AppRoles []AppRole `json:"appRoles"`
RequiredResourceAccess []RequiredResourceAccess `json:"requiredResourceAccess"`
PasswordCredentials []PasswordCredential `json:"passwordCredentials"`
KeyCredentials []KeyCredential `json:"keyCredentials"`
Web WebApplication `json:"web"`
IsFallbackPublicClient bool `json:"isFallbackPublicClient"`
OAuth2RequirePostResponse bool `json:"oauth2RequirePostResponse"`
}
Application is an application registration.
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend is the in-memory directory shared by the Graph listener and the ARM token endpoint.
func NewBackend ¶
NewBackend returns a directory seeded with the Microsoft Graph service principal.
func (*Backend) AddKey ¶
func (b *Backend) AddKey(id string, in KeyCredential) (KeyCredential, error)
AddKey registers a key credential. The key material is validated but not retained.
func (*Backend) AddPassword ¶
func (b *Backend) AddPassword(id string, in PasswordCredential) (PasswordCredential, error)
AddPassword adds a client secret to an application or service principal. The returned credential carries SecretText; it is the only time the secret is available.
func (*Backend) AuthenticateClient ¶
AuthenticateClient checks a client-credentials request against the registered applications. known is false for a client ID no application or service principal uses, leaving the caller free to apply its own policy. On success objectID is the service principal's object ID, the token's oid claim.
func (*Backend) ByIDs ¶
ByIDs resolves object IDs, optionally restricted to kinds ("user", "group", ... or "directoryObject").
func (*Backend) CreateAppRoleAssignment ¶
func (b *Backend) CreateAppRoleAssignment( ownerID string, asResource bool, body map[string]json.RawMessage, ) (AppRoleAssignment, error)
CreateAppRoleAssignment grants an app role. ownerID is the path service principal, user or group; asResource selects appRoleAssignedTo (owner is the resource) over appRoleAssignments (owner is the principal).
func (*Backend) CreateApplication ¶
func (b *Backend) CreateApplication(body map[string]json.RawMessage) (Application, error)
CreateApplication registers an application.
func (*Backend) CreateGrant ¶
func (b *Backend) CreateGrant(body map[string]json.RawMessage) (OAuth2PermissionGrant, error)
CreateGrant records a delegated permission grant.
func (*Backend) CreateGroup ¶
CreateGroup creates a group; members@odata.bind and owners@odata.bind add references atomically.
func (*Backend) CreateServicePrincipal ¶
func (b *Backend) CreateServicePrincipal(body map[string]json.RawMessage) (ServicePrincipal, error)
CreateServicePrincipal instantiates an application in the tenant; body.appId must name a registered application.
func (*Backend) CreateUser ¶
CreateUser creates a user. passwordProfile is validated and discarded.
func (*Backend) DeleteAppRoleAssignment ¶
DeleteAppRoleAssignment removes an assignment owned by id.
func (*Backend) DeleteApplication ¶
DeleteApplication removes an application and its service principal.
func (*Backend) DeleteGrant ¶
DeleteGrant removes a grant.
func (*Backend) DeleteGroup ¶
DeleteGroup removes a group.
func (*Backend) DeleteServicePrincipal ¶
DeleteServicePrincipal removes a service principal.
func (*Backend) GetApplication ¶
func (b *Backend) GetApplication(r Ref) (Application, error)
GetApplication returns an application.
func (*Backend) GetServicePrincipal ¶
func (b *Backend) GetServicePrincipal(r Ref) (ServicePrincipal, error)
GetServicePrincipal returns a service principal.
func (*Backend) ListAppRoleAssignments ¶
func (b *Backend) ListAppRoleAssignments(id string, asResource bool) ([]AppRoleAssignment, error)
ListAppRoleAssignments lists assignments where id is the principal, or (asResource) the resource.
func (*Backend) ListApplications ¶
func (b *Backend) ListApplications() []Application
ListApplications returns every application in creation order.
func (*Backend) ListGrants ¶
func (b *Backend) ListGrants() []OAuth2PermissionGrant
ListGrants returns every delegated permission grant.
func (*Backend) ListGroups ¶
ListGroups returns every group in creation order.
func (*Backend) ListServicePrincipals ¶
func (b *Backend) ListServicePrincipals() []ServicePrincipal
ListServicePrincipals returns every service principal in creation order.
func (*Backend) MemberOf ¶
MemberOf lists the groups id belongs to, directly or (transitive) through nesting.
func (*Backend) ObjectKind ¶
ObjectKind reports whether id names a directory object and its kind.
func (*Backend) PrincipalType ¶
PrincipalType reports whether id is a user, group or service principal and returns its role-assignment principal type (User, Group or ServicePrincipal).
func (*Backend) RemoveMember ¶
RemoveMember removes a group member reference.
func (*Backend) RemoveOwner ¶
RemoveOwner removes an owner reference.
func (*Backend) RemovePassword ¶
RemovePassword deletes a client secret.
func (*Backend) Reset ¶
func (b *Backend) Reset()
Reset drops all state and re-seeds the built-in service principals.
func (*Backend) Snapshot ¶
Snapshot implements persistence.Persistable. Secrets are salted PBKDF2 hashes; plaintext is never stored.
func (*Backend) TransitiveMembers ¶
TransitiveMembers lists a group's members including those of nested groups.
func (*Backend) UpdateApplication ¶
UpdateApplication applies a PATCH body.
func (*Backend) UpdateGrant ¶
UpdateGrant changes the scope of a grant.
func (*Backend) UpdateGroup ¶
UpdateGroup applies a PATCH body. isAssignableToRole can only be set at creation.
func (*Backend) UpdateServicePrincipal ¶
UpdateServicePrincipal applies a PATCH body.
func (*Backend) UpdateUser ¶
UpdateUser applies a PATCH body.
type ClientAuthError ¶
ClientAuthError is an Entra token endpoint failure for a client-credentials request.
func (*ClientAuthError) Error ¶
func (e *ClientAuthError) Error() string
type ConfigProvider ¶
type ConfigProvider interface {
GetAzureGraphSettings() Settings
}
ConfigProvider extracts the Microsoft Graph settings from the AppContext config.
type Group ¶
type Group struct {
CreatedDateTime time.Time `json:"createdDateTime"`
IsAssignableToRole *bool `json:"isAssignableToRole"`
MembershipRule string `json:"membershipRule,omitempty"`
MembershipRuleProcessingState string `json:"membershipRuleProcessingState,omitempty"`
MailNickname string `json:"mailNickname"`
Mail string `json:"mail,omitempty"`
Visibility string `json:"visibility,omitempty"`
Classification string `json:"classification,omitempty"`
DisplayName string `json:"displayName"`
Description string `json:"description,omitempty"`
PreferredDataLocation string `json:"preferredDataLocation,omitempty"`
ID string `json:"id"`
ResourceBehaviorOptions []string `json:"resourceBehaviorOptions"`
ResourceProvisioningOptions []string `json:"resourceProvisioningOptions"`
GroupTypes []string `json:"groupTypes"`
MailEnabled bool `json:"mailEnabled"`
SecurityEnabled bool `json:"securityEnabled"`
}
Group is a security, Microsoft 365 or distribution group.
type Handler ¶
type Handler struct {
Backend *Backend
// Issuer verifies bearer tokens when Settings.ValidateTokens is set; cli wiring shares ARM's issuer.
Issuer *aadauth.Issuer
// Settings holds the listener configuration.
Settings Settings
// Port is the fixed TCP port StartWorker binds.
Port int
// contains filtered or unexported fields
}
Handler serves Microsoft Graph v1.0 directory APIs on a dedicated HTTPS listener.
func NewHandler ¶
NewHandler creates a Handler.
func (*Handler) ExtractOperation ¶
ExtractOperation names the operation for metrics.
func (*Handler) ExtractResource ¶
ExtractResource returns the request path for metrics.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations lists the operation names ExtractOperation can return.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler for the Graph API.
func (*Handler) MatchPriority ¶
MatchPriority is irrelevant because RouteMatcher never matches.
func (*Handler) RouteMatcher ¶
RouteMatcher never matches: Microsoft Graph runs on its own listener.
type ImplicitGrantSettings ¶
type ImplicitGrantSettings struct {
EnableAccessTokenIssuance bool `json:"enableAccessTokenIssuance"`
EnableIDTokenIssuance bool `json:"enableIdTokenIssuance"`
}
ImplicitGrantSettings is web.implicitGrantSettings.
type KeyCredential ¶
type KeyCredential struct {
StartDateTime time.Time `json:"startDateTime"`
EndDateTime time.Time `json:"endDateTime"`
Key *string `json:"key"`
CustomKeyIdentifier *string `json:"customKeyIdentifier"`
DisplayName *string `json:"displayName"`
KeyID string `json:"keyId"`
Type string `json:"type"`
Usage string `json:"usage"`
}
KeyCredential is a certificate or key credential; the key material is never returned.
type OAuth2PermissionGrant ¶
type OAuth2PermissionGrant struct {
ID string `json:"id"`
ClientID string `json:"clientId"`
ConsentType string `json:"consentType"`
PrincipalID string `json:"principalId,omitempty"`
ResourceID string `json:"resourceId"`
Scope string `json:"scope"`
}
OAuth2PermissionGrant is a delegated permission grant.
type Object ¶
Object is a directory object of any kind with its entity (Application, ServicePrincipal, User or Group).
type PasswordCredential ¶
type PasswordCredential struct {
StartDateTime time.Time `json:"startDateTime"`
EndDateTime time.Time `json:"endDateTime"`
SecretText *string `json:"secretText"`
CustomKeyIdentifier *string `json:"customKeyIdentifier"`
DisplayName *string `json:"displayName"`
Hint *string `json:"hint"`
KeyID string `json:"keyId"`
}
PasswordCredential is a client secret; SecretText is only set in the addPassword response.
type PasswordProfile ¶
type PasswordProfile struct {
Password string `json:"password"`
ForceChangePasswordNextSignIn bool `json:"forceChangePasswordNextSignIn"`
ForceChangePasswordNextMFA bool `json:"forceChangePasswordNextSignInWithMfa"`
}
PasswordProfile is accepted on write and never returned.
type PermissionScope ¶
type PermissionScope struct {
ID string `json:"id"`
AdminConsentDescription string `json:"adminConsentDescription,omitempty"`
AdminConsentDisplayName string `json:"adminConsentDisplayName,omitempty"`
Type string `json:"type,omitempty"`
UserConsentDescription string `json:"userConsentDescription,omitempty"`
UserConsentDisplayName string `json:"userConsentDisplayName,omitempty"`
Value string `json:"value,omitempty"`
IsEnabled bool `json:"isEnabled"`
}
PermissionScope is an api.oauth2PermissionScopes entry.
type PreAuthorizedApplication ¶
type PreAuthorizedApplication struct {
AppID string `json:"appId"`
DelegatedPermissionIDs []string `json:"delegatedPermissionIds"`
}
PreAuthorizedApplication is an api.preAuthorizedApplications entry.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for Microsoft Graph.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init builds the backend and handler; the port is bound by Handler.StartWorker.
type RedirectFacet ¶
type RedirectFacet struct {
RedirectURIs []string `json:"redirectUris"`
}
RedirectFacet carries redirectUris for the spa and publicClient facets.
type RequiredResourceAccess ¶
type RequiredResourceAccess struct {
ResourceAppID string `json:"resourceAppId"`
ResourceAccess []ResourceAccess `json:"resourceAccess"`
}
RequiredResourceAccess declares the permissions an application needs from one resource.
type ResourceAccess ¶
ResourceAccess is a requiredResourceAccess.resourceAccess entry.
type ServicePrincipal ¶
type ServicePrincipal struct {
AddIns json.RawMessage `json:"addIns,omitempty"`
DisabledByMicrosoftStatus json.RawMessage `json:"disabledByMicrosoftStatus,omitempty"`
ResourceSpecificPermissions json.RawMessage `json:"resourceSpecificApplicationPermissions,omitempty"`
PasswordSSOSettings json.RawMessage `json:"passwordSingleSignOnSettings,omitempty"`
PreferredKeyEndDateTime json.RawMessage `json:"preferredTokenSigningKeyEndDateTime,omitempty"`
CustomSecurityAttributes json.RawMessage `json:"customSecurityAttributes,omitempty"`
SAMLMetadataURL string `json:"samlMetadataUrl,omitempty"`
ApplicationTemplateID string `json:"applicationTemplateId,omitempty"`
CreatedDateTime time.Time `json:"createdDateTime"`
Info json.RawMessage `json:"info,omitempty"`
VerifiedPublisher json.RawMessage `json:"verifiedPublisher,omitempty"`
SAMLSingleSignOnSettings json.RawMessage `json:"samlSingleSignOnSettings,omitempty"`
ID string `json:"id"`
AppID string `json:"appId"`
DisplayName string `json:"displayName"`
AppDisplayName string `json:"appDisplayName"`
AppDescription string `json:"appDescription,omitempty"`
AppOwnerOrganizationID string `json:"appOwnerOrganizationId,omitempty"`
Description string `json:"description,omitempty"`
LoginURL string `json:"loginUrl,omitempty"`
LogoutURL string `json:"logoutUrl,omitempty"`
Homepage string `json:"homepage,omitempty"`
Notes string `json:"notes,omitempty"`
PreferredSingleSignOnMode string `json:"preferredSingleSignOnMode,omitempty"`
PreferredTokenSigningKeyThumb string `json:"preferredTokenSigningKeyThumbprint,omitempty"`
ServicePrincipalType string `json:"servicePrincipalType"`
SignInAudience string `json:"signInAudience"`
TokenEncryptionKeyID string `json:"tokenEncryptionKeyId,omitempty"`
AlternativeNames []string `json:"alternativeNames"`
NotificationEmailAddresses []string `json:"notificationEmailAddresses"`
ReplyURLs []string `json:"replyUrls"`
ServicePrincipalNames []string `json:"servicePrincipalNames"`
Tags []string `json:"tags"`
AppRoles []AppRole `json:"appRoles"`
OAuth2PermissionScopes []PermissionScope `json:"oauth2PermissionScopes"`
PasswordCredentials []PasswordCredential `json:"passwordCredentials"`
KeyCredentials []KeyCredential `json:"keyCredentials"`
AccountEnabled bool `json:"accountEnabled"`
AppRoleAssignmentRequired bool `json:"appRoleAssignmentRequired"`
}
ServicePrincipal is the local instance of an application in the tenant.
type Settings ¶
type Settings struct {
TLSCertFile string `` //nolint:lll // config struct tags are intentionally verbose
/* 241-byte string literal not displayed */
TLSKeyFile string `` //nolint:lll // config struct tags are intentionally verbose
/* 138-byte string literal not displayed */
TenantID string `` //nolint:lll // config struct tags are intentionally verbose
/* 288-byte string literal not displayed */
DefaultDomain string `` //nolint:lll // config struct tags are intentionally verbose
/* 279-byte string literal not displayed */
DevClientID string `` //nolint:lll // config struct tags are intentionally verbose
/* 288-byte string literal not displayed */
ExtraDomains string `` //nolint:lll // config struct tags are intentionally verbose
/* 130-byte string literal not displayed */
Port int `` //nolint:lll // config struct tags are intentionally verbose
/* 257-byte string literal not displayed */
ValidateTokens bool `` //nolint:lll // config struct tags are intentionally verbose
/* 257-byte string literal not displayed */
}
Settings is the Kong-embedded configuration of the Microsoft Graph emulator.
func DefaultSettings ¶
func DefaultSettings() Settings
DefaultSettings returns the settings used when no ConfigProvider exists.
type User ¶
type User struct {
CreatedDateTime time.Time `json:"createdDateTime"`
PasswordProfile *PasswordProfile `json:"passwordProfile,omitempty"`
ID string `json:"id"`
UserPrincipalName string `json:"userPrincipalName"`
DisplayName string `json:"displayName"`
MailNickname string `json:"mailNickname"`
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"`
CompanyName string `json:"companyName,omitempty"`
OfficeLocation string `json:"officeLocation,omitempty"`
City string `json:"city,omitempty"`
State string `json:"state,omitempty"`
Country string `json:"country,omitempty"`
StreetAddress string `json:"streetAddress,omitempty"`
PostalCode string `json:"postalCode,omitempty"`
MobilePhone string `json:"mobilePhone,omitempty"`
PreferredLanguage string `json:"preferredLanguage,omitempty"`
UsageLocation string `json:"usageLocation,omitempty"`
EmployeeID string `json:"employeeId,omitempty"`
PasswordPolicies string `json:"passwordPolicies,omitempty"`
OnPremImmutableID string `json:"onPremisesImmutableId,omitempty"`
UserType string `json:"userType"`
BusinessPhones []string `json:"businessPhones"`
OtherMails []string `json:"otherMails"`
AccountEnabled bool `json:"accountEnabled"`
}
User is a directory user.
type WebApplication ¶
type WebApplication struct {
HomePageURL string `json:"homePageUrl"`
LogoutURL string `json:"logoutUrl"`
RedirectURIs []string `json:"redirectUris"`
ImplicitGrantSettings ImplicitGrantSettings `json:"implicitGrantSettings"`
}
WebApplication is the application's web facet.