Documentation
¶
Index ¶
- type AddIn
- type AddInKeyValue
- type ApiPreAuthorizedApplication
- type ApiVersion
- type AppRole
- type Application
- type ApplicationApi
- type ApplicationWeb
- type ApplicationsClient
- func (c *ApplicationsClient) AddKey(ctx context.Context, applicationId string, keyCredential KeyCredential) (*KeyCredential, int, error)
- func (c *ApplicationsClient) AddOwners(ctx context.Context, application *Application) (int, error)
- func (c *ApplicationsClient) Create(ctx context.Context, application Application) (*Application, int, error)
- func (c *ApplicationsClient) Delete(ctx context.Context, id string) (int, error)
- func (c *ApplicationsClient) Get(ctx context.Context, id string) (*Application, int, error)
- func (c *ApplicationsClient) GetOwner(ctx context.Context, applicationId, ownerId string) (*string, int, error)
- func (c *ApplicationsClient) List(ctx context.Context, filter string) (*[]Application, int, error)
- func (c *ApplicationsClient) ListOwners(ctx context.Context, id string) (*[]string, int, error)
- func (c *ApplicationsClient) RemoveOwners(ctx context.Context, applicationId string, ownerIds *[]string) (int, error)
- func (c *ApplicationsClient) Update(ctx context.Context, application Application) (int, error)
- type Client
- func (c Client) Delete(ctx context.Context, input DeleteHttpRequestInput) (*http.Response, int, *odata.OData, error)
- func (c Client) Get(ctx context.Context, input GetHttpRequestInput) (*http.Response, int, *odata.OData, error)
- func (c Client) Patch(ctx context.Context, input PatchHttpRequestInput) (*http.Response, int, *odata.OData, error)
- func (c Client) Post(ctx context.Context, input PostHttpRequestInput) (*http.Response, int, *odata.OData, error)
- func (c Client) Put(ctx context.Context, input PutHttpRequestInput) (*http.Response, int, *odata.OData, error)
- type DeleteHttpRequestInput
- type Domain
- type DomainState
- type DomainsClient
- type EmailAddress
- type GetHttpRequestInput
- type GraphClient
- type Group
- type GroupAssignedLabel
- type GroupAssignedLicense
- type GroupOnPremisesProvisioningError
- type GroupsClient
- func (c *GroupsClient) AddMembers(ctx context.Context, group *Group) (int, error)
- func (c *GroupsClient) AddOwners(ctx context.Context, group *Group) (int, error)
- func (c *GroupsClient) Create(ctx context.Context, group Group) (*Group, int, error)
- func (c *GroupsClient) Delete(ctx context.Context, id string) (int, error)
- func (c *GroupsClient) Get(ctx context.Context, id string) (*Group, int, error)
- func (c *GroupsClient) GetMember(ctx context.Context, groupId, memberId string) (*string, int, error)
- func (c *GroupsClient) GetOwner(ctx context.Context, groupId, ownerId string) (*string, int, error)
- func (c *GroupsClient) List(ctx context.Context, filter string) (*[]Group, int, error)
- func (c *GroupsClient) ListMembers(ctx context.Context, id string) (*[]string, int, error)
- func (c *GroupsClient) ListOwners(ctx context.Context, id string) (*[]string, int, error)
- func (c *GroupsClient) RemoveMembers(ctx context.Context, id string, memberIds *[]string) (int, error)
- func (c *GroupsClient) RemoveOwners(ctx context.Context, id string, ownerIds *[]string) (int, error)
- func (c *GroupsClient) Update(ctx context.Context, group Group) (int, error)
- type HttpRequestInput
- type ImplicitGrantSettings
- type InformationalUrl
- type Invitation
- type InvitationsClient
- type InvitedUserMessageInfo
- type KerberosSignOnSettings
- type KeyCredential
- type Me
- type MeClient
- type OnPremisesPublishing
- type OnPremisesPublishingSingleSignOn
- type OnPremisesPublishingVerifiedCustomDomainCertificatesMetadata
- type OptionalClaim
- type OptionalClaims
- type ParentalControlSettings
- type PasswordCredential
- type PasswordSingleSignOnSettings
- type PatchHttpRequestInput
- type PermissionScope
- type PostHttpRequestInput
- type PublicClient
- type PutHttpRequestInput
- type Recipient
- type RequiredResourceAccess
- type ResourceAccess
- type SamlSingleSignOnSettings
- type ServicePrincipal
- type ServicePrincipalsClient
- func (c *ServicePrincipalsClient) AddOwners(ctx context.Context, servicePrincipal *ServicePrincipal) (int, error)
- func (c *ServicePrincipalsClient) Create(ctx context.Context, servicePrincipal ServicePrincipal) (*ServicePrincipal, int, error)
- func (c *ServicePrincipalsClient) Delete(ctx context.Context, id string) (int, error)
- func (c *ServicePrincipalsClient) Get(ctx context.Context, id string) (*ServicePrincipal, int, error)
- func (c *ServicePrincipalsClient) GetOwner(ctx context.Context, servicePrincipalId, ownerId string) (*string, int, error)
- func (c *ServicePrincipalsClient) List(ctx context.Context, filter string) (*[]ServicePrincipal, int, error)
- func (c *ServicePrincipalsClient) ListGroupMemberships(ctx context.Context, id string, filter string) (*[]Group, int, error)
- func (c *ServicePrincipalsClient) ListOwners(ctx context.Context, id string) (*[]string, int, error)
- func (c *ServicePrincipalsClient) RemoveOwners(ctx context.Context, servicePrincipalId string, ownerIds *[]string) (int, error)
- func (c *ServicePrincipalsClient) Update(ctx context.Context, servicePrincipal ServicePrincipal) (int, error)
- type SignInAudience
- type SingleSignOnField
- type Uri
- type User
- type UserPasswordProfile
- type UsersClient
- func (c *UsersClient) Create(ctx context.Context, user User) (*User, int, error)
- func (c *UsersClient) Delete(ctx context.Context, id string) (int, error)
- func (c *UsersClient) Get(ctx context.Context, id string) (*User, int, error)
- func (c *UsersClient) List(ctx context.Context, filter string) (*[]User, int, error)
- func (c *UsersClient) ListGroupMemberships(ctx context.Context, id string, filter string) (*[]Group, int, error)
- func (c *UsersClient) Update(ctx context.Context, user User) (int, error)
- type ValidStatusFunc
- type VerifiedPublisher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddIn ¶
type AddIn struct {
ID *string `json:"id,omitempty"`
Properties *[]AddInKeyValue `json:"properties,omitempty"`
Type *string `json:"type,omitempty"`
}
type AddInKeyValue ¶
type ApiVersion ¶
type ApiVersion string
const ( Version10 ApiVersion = "v1.0" VersionBeta ApiVersion = "beta" )
type AppRole ¶
type AppRole struct {
ID *string `json:"id,omitempty"`
AllowedMemberTypes *[]string `json:"allowedMemberTypes,omitempty"`
Description *string `json:"description,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
IsEnabled *bool `json:"isEnabled,omitempty"`
Origin *string `json:"origin,omitempty"`
Value *string `json:"value,omitempty"`
}
type Application ¶
type Application struct {
ID *string `json:"id,omitempty"`
AddIns *[]AddIn `json:"addIns,omitempty"`
Api *ApplicationApi `json:"api,omitempty"`
AppId *string `json:"appId,omitempty"`
AppRoles *[]AppRole `json:"appRoles,omitempty"`
CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
DeletedDateTime *time.Time `json:"deletedDateTime,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
GroupMembershipClaims *string `json:"groupMembershipClaims,omitempty"`
IdentifierUris *[]string `json:"identifierUris,omitempty"`
Info *InformationalUrl `json:"info,omitempty"`
IsFallbackPublicClient *bool `json:"isFallbackPublicCLient,omitempty"`
KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"`
Oauth2RequiredPostResponse *bool `json:"oauth2RequiredPostResponse,omitempty"`
OnPremisesPublishing *OnPremisesPublishing `json:"onPremisePublishing,omitempty"`
OptionalClaims *OptionalClaims `json:"optionalClaims,omitempty"`
ParentalControlSettings *ParentalControlSettings `json:"parentalControlSettings,omitempty"`
PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"`
PublicClient *PublicClient `json:"publicClient,omitempty"`
PublisherDomain *string `json:"publisherDomain,omitempty"`
RequiredResourceAccess *[]RequiredResourceAccess `json:"requiredResourceAccess,omitempty"`
SignInAudience SignInAudience `json:"signInAudience,omitempty"`
Tags *[]string `json:"tags,omitempty"`
TokenEncryptionKeyId *string `json:"tokenEncryptionKeyId,omitempty"`
Web *ApplicationWeb `json:"web,omitempty"`
Owners *[]string `json:"owners@odata.bind,omitempty"`
}
Application describes an Application object.
func (*Application) AppendAppRole ¶
func (a *Application) AppendAppRole(role AppRole) error
AppendAppRole adds a new AppRole to an Application, checking to see if it already exists.
func (*Application) AppendOwner ¶
func (a *Application) AppendOwner(endpoint environments.ApiEndpoint, apiVersion ApiVersion, id string)
AppendOwner appends a new owner object URI to the Owners slice.
func (*Application) RemoveAppRole ¶
func (a *Application) RemoveAppRole(role AppRole) error
RemoveAppRole removes an AppRole from an Application.
func (*Application) UpdateAppRole ¶
func (a *Application) UpdateAppRole(role AppRole) error
UpdateAppRole amends an existing AppRole defined in an Application.
type ApplicationApi ¶
type ApplicationApi struct {
AcceptMappedClaims *bool `json:"acceptMappedClaims,omitempty"`
KnownClientApplications *[]string `json:"knownClientApplications,omitempty"`
OAuth2PermissionScopes *[]PermissionScope `json:"oauth2PermissionScopes,omitempty"`
PreAuthorizedApplications *[]ApiPreAuthorizedApplication `json:"preAuthorizedApplications,omitempty"`
RequestedAccessTokenVersion *int32 `json:"requestedAccessTokenVersion,omitempty"`
}
func (*ApplicationApi) AppendOAuth2PermissionScope ¶
func (a *ApplicationApi) AppendOAuth2PermissionScope(scope PermissionScope) error
AppendOAuth2PermissionScope adds a new ApplicationOAuth2PermissionScope to an ApplicationApi, checking to see if it already exists.
func (*ApplicationApi) RemoveOAuth2PermissionScope ¶
func (a *ApplicationApi) RemoveOAuth2PermissionScope(scope PermissionScope) error
RemoveOAuth2PermissionScope removes an ApplicationOAuth2PermissionScope from an ApplicationApi.
func (*ApplicationApi) UpdateOAuth2PermissionScope ¶
func (a *ApplicationApi) UpdateOAuth2PermissionScope(scope PermissionScope) error
UpdateOAuth2PermissionScope amends an existing ApplicationOAuth2PermissionScope defined in an ApplicationApi.
type ApplicationWeb ¶
type ApplicationWeb struct {
HomePageUrl *string `json:"homePageUrl"`
ImplicitGrantSettings *ImplicitGrantSettings `json:"implicitGrantSettings,omitempty"`
LogoutUrl *string `json:"logoutUrl"`
RedirectUris *[]string `json:"redirectUris,omitempty"`
}
type ApplicationsClient ¶
type ApplicationsClient struct {
BaseClient Client
}
ApplicationsClient performs operations on Applications.
func NewApplicationsClient ¶
func NewApplicationsClient(tenantId string) *ApplicationsClient
NewApplicationsClient returns a new ApplicationsClient
func (*ApplicationsClient) AddKey ¶
func (c *ApplicationsClient) AddKey(ctx context.Context, applicationId string, keyCredential KeyCredential) (*KeyCredential, int, error)
AddKey appends a new key credential to an Application.
func (*ApplicationsClient) AddOwners ¶
func (c *ApplicationsClient) AddOwners(ctx context.Context, application *Application) (int, error)
AddOwners adds a new owner to an Application. First populate the Owners field of the Application using the AppendOwner method of the model, then call this method.
func (*ApplicationsClient) Create ¶
func (c *ApplicationsClient) Create(ctx context.Context, application Application) (*Application, int, error)
Create creates a new Application.
func (*ApplicationsClient) Get ¶
func (c *ApplicationsClient) Get(ctx context.Context, id string) (*Application, int, error)
Get retrieves an Application manifest.
func (*ApplicationsClient) GetOwner ¶
func (c *ApplicationsClient) GetOwner(ctx context.Context, applicationId, ownerId string) (*string, int, error)
GetOwner retrieves a single owner for the specified Application. applicationId is the object ID of the application. ownerId is the object ID of the owning object.
func (*ApplicationsClient) List ¶
func (c *ApplicationsClient) List(ctx context.Context, filter string) (*[]Application, int, error)
List returns a list of Applications, optionally filtered using OData.
func (*ApplicationsClient) ListOwners ¶
ListOwners retrieves the owners of the specified Application. id is the object ID of the application.
func (*ApplicationsClient) RemoveOwners ¶
func (c *ApplicationsClient) RemoveOwners(ctx context.Context, applicationId string, ownerIds *[]string) (int, error)
RemoveOwners removes owners from an Application. applicationId is the object ID of the application. ownerIds is a *[]string containing object IDs of owners to remove.
func (*ApplicationsClient) Update ¶
func (c *ApplicationsClient) Update(ctx context.Context, application Application) (int, error)
Update amends the manifest of an existing Application.
type Client ¶
type Client struct {
// Endpoint is the base endpoint for Microsoft Graph, usually "https://graph.microsoft.com".
Endpoint environments.ApiEndpoint
// ApiVersion is the Microsoft Graph API version to use.
ApiVersion ApiVersion
// TenantId is the tenant ID to use in requests.
TenantId string
// UserAgent is the HTTP user agent string to send in requests.
UserAgent string
// Authorizer is anything that can provide an access token with which to authorize requests.
Authorizer auth.Authorizer
// contains filtered or unexported fields
}
Client is a base client to be used by clients for specific entities. It can send GET, POST, PUT, PATCH and DELETE requests to Microsoft Graph and is API version and tenant aware.
func NewClient ¶
func NewClient(apiVersion ApiVersion, tenantId string) Client
NewClient returns a new Client configured with the specified API version and tenant ID.
func (Client) Delete ¶
func (c Client) Delete(ctx context.Context, input DeleteHttpRequestInput) (*http.Response, int, *odata.OData, error)
Delete performs a DELETE request.
func (Client) Get ¶
func (c Client) Get(ctx context.Context, input GetHttpRequestInput) (*http.Response, int, *odata.OData, error)
Get performs a GET request.
func (Client) Patch ¶
func (c Client) Patch(ctx context.Context, input PatchHttpRequestInput) (*http.Response, int, *odata.OData, error)
Patch performs a PATCH request.
type DeleteHttpRequestInput ¶
type DeleteHttpRequestInput struct {
ValidStatusCodes []int
ValidStatusFunc ValidStatusFunc
Uri Uri
}
DeleteHttpRequestInput configures a DELETE request.
func (DeleteHttpRequestInput) GetValidStatusCodes ¶
func (i DeleteHttpRequestInput) GetValidStatusCodes() []int
GetValidStatusCodes returns a []int of status codes considered valid for a DELETE request.
func (DeleteHttpRequestInput) GetValidStatusFunc ¶
func (i DeleteHttpRequestInput) GetValidStatusFunc() ValidStatusFunc
GetValidStatusFunc returns a function used to evaluate whether the response to a DELETE request is considered valid.
type Domain ¶
type Domain struct {
ID *string `json:"id,omitempty"`
AuthenticationType *string `json:"authenticationType,omitempty"`
IsAdminManaged *bool `json:"isAdminManaged,omitempty"`
IsDefault *bool `json:"isDefault,omitempty"`
IsInitial *bool `json:"isInitial,omitempty"`
IsRoot *bool `json:"isRoot,omitempty"`
IsVerified *bool `json:"isVerified,omitempty"`
PasswordNotificationWindowInDays *int `json:"passwordNotificationWindowInDays,omitempty"`
PasswordValidityPeriodInDays *int `json:"passwordValidityPeriodInDays,omitempty"`
SupportedServices *[]string `json:"supportedServices,omitempty"`
State *DomainState `json:"state,omitempty"`
}
Domain describes a Domain object.
type DomainState ¶
type DomainsClient ¶
type DomainsClient struct {
BaseClient Client
}
DomainsClient performs operations on Domains.
func NewDomainsClient ¶
func NewDomainsClient(tenantId string) *DomainsClient
NewDomainsClient returns a new DomainsClient.
type EmailAddress ¶
type GetHttpRequestInput ¶
type GetHttpRequestInput struct {
ValidStatusCodes []int
ValidStatusFunc ValidStatusFunc
Uri Uri
// contains filtered or unexported fields
}
GetHttpRequestInput configures a GET request.
func (GetHttpRequestInput) GetValidStatusCodes ¶
func (i GetHttpRequestInput) GetValidStatusCodes() []int
GetValidStatusCodes returns a []int of status codes considered valid for a GET request.
func (GetHttpRequestInput) GetValidStatusFunc ¶
func (i GetHttpRequestInput) GetValidStatusFunc() ValidStatusFunc
GetValidStatusFunc returns a function used to evaluate whether the response to a GET request is considered valid.
type Group ¶
type Group struct {
ID *string `json:"id,omitempty"`
AllowExternalSenders *string `json:"allowExternalSenders,omitempty"`
AssignedLabels *[]GroupAssignedLabel `json:"assignedLabels,omitempty"`
AssignedLicenses *[]GroupAssignedLicense `json:"assignLicenses,omitempty"`
AutoSubscribeNewMembers *bool `json:"autoSubscribeNewMembers,omitempty"`
Classification *string `json:"classification,omitempty"`
CreatedDateTime *time.Time `json:"createdDateTime,omitempty"`
DeletedDateTime *time.Time `json:"deletedDateTime,omitempty"`
Description *string `json:"description,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
ExpirationDateTime *time.Time `json:"expirationDateTime,omitempty"`
GroupTypes *[]string `json:"groupTypes,omitempty"`
HasMembersWithLicenseErrors *bool `json:"hasMembersWithLicenseErrors,omitempty"`
HideFromAddressLists *bool `json:"hideFromAddressLists,omitempty"`
HideFromOutlookClients *bool `json:"hideFromOutlookClients,omitempty"`
IsSubscribedByMail *bool `json:"isSubscribedByMail,omitempty"`
LicenseProcessingState *string `json:"licenseProcessingState,omitempty"`
Mail *string `json:"mail,omitempty"`
MailEnabled *bool `json:"mailEnabled,omitempty"`
MailNickname *string `json:"mailNickname,omitempty"`
MembershipRule *string `json:"membershipRule,omitempty"`
MembershipRuleProcessingState *string `json:"membershipRuleProcessingState,omitempty"`
OnPremisesDomainName *string `json:"onPremisesDomainName,omitempty"`
OnPremisesLastSyncDateTime *time.Time `json:"onPremisesLastSyncDateTime,omitempty"`
OnPremisesNetBiosName *string `json:"onPremisesNetBiosName,omitempty"`
OnPremisesProvisioningErrors *[]GroupOnPremisesProvisioningError `json:"onPremisesProvisioningErrors,omitempty"`
OnPremisesSamAccountName *string `json:"onPremisesSamAccountName,omitempty"`
OnPremisesSecurityIdentifier *string `json:"onPremisesSecurityIdentifier,omitempty"`
OnPremisesSyncEnabled *bool `json:"onPremisesSyncEnabled,omitempty"`
PreferredDataLocation *string `json:"preferredDataLocation,omitempty"`
PreferredLanguage *string `json:"preferredLanguage,omitempty"`
ProxyAddresses *[]string `json:"proxyAddresses,omitempty"`
RenewedDateTime *time.Time `json:"renewedDateTime,omitempty"`
SecurityEnabled *bool `json:"securityEnabled,omitempty"`
SecurityIdentifier *string `json:"securityIdentifier,omitempty"`
Theme *string `json:"theme,omitempty"`
UnseenCount *int `json:"unseenCount,omitempty"`
Visibility *string `json:"visibility,omitempty"`
Members *[]string `json:"members@odata.bind,omitempty"`
Owners *[]string `json:"owners@odata.bind,omitempty"`
}
Group describes a Group object.
func (*Group) AppendMember ¶
func (g *Group) AppendMember(endpoint environments.ApiEndpoint, apiVersion ApiVersion, id string)
AppendMember appends a new member object URI to the Members slice.
func (*Group) AppendOwner ¶
func (g *Group) AppendOwner(endpoint environments.ApiEndpoint, apiVersion ApiVersion, id string)
AppendOwner appends a new owner object URI to the Owners slice.
type GroupAssignedLabel ¶
type GroupAssignedLicense ¶
type GroupsClient ¶
type GroupsClient struct {
BaseClient Client
}
GroupsClient performs operations on Groups.
func NewGroupsClient ¶
func NewGroupsClient(tenantId string) *GroupsClient
NewGroupsClient returns a new GroupsClient.
func (*GroupsClient) AddMembers ¶
AddMembers adds a new member to a Group. First populate the Members field of the Group using the AppendMember method of the model, then call this method.
func (*GroupsClient) AddOwners ¶
AddOwners adds a new owner to a Group. First populate the Owners field of the Group using the AppendOwner method of the model, then call this method.
func (*GroupsClient) GetMember ¶
func (c *GroupsClient) GetMember(ctx context.Context, groupId, memberId string) (*string, int, error)
GetMember retrieves a single member of the specified Group. groupId is the object ID of the group. memberId is the object ID of the member object.
func (*GroupsClient) GetOwner ¶
GetOwner retrieves a single owner for the specified Group. groupId is the object ID of the group. ownerId is the object ID of the owning object.
func (*GroupsClient) ListMembers ¶
ListMembers retrieves the members of the specified Group. id is the object ID of the group.
func (*GroupsClient) ListOwners ¶
ListOwners retrieves the owners of the specified Group. id is the object ID of the group.
func (*GroupsClient) RemoveMembers ¶
func (c *GroupsClient) RemoveMembers(ctx context.Context, id string, memberIds *[]string) (int, error)
RemoveMembers removes members from a Group. groupId is the object ID of the group. memberIds is a *[]string containing object IDs of members to remove.
func (*GroupsClient) RemoveOwners ¶
func (c *GroupsClient) RemoveOwners(ctx context.Context, id string, ownerIds *[]string) (int, error)
RemoveOwners removes owners from a Group. groupId is the object ID of the group. ownerIds is a *[]string containing object IDs of owners to remove.
type HttpRequestInput ¶
type HttpRequestInput interface {
GetValidStatusCodes() []int
GetValidStatusFunc() ValidStatusFunc
}
HttpRequestInput is any type that can validate the response to an HTTP request.
type ImplicitGrantSettings ¶
type InformationalUrl ¶
type Invitation ¶
type Invitation struct {
ID *string `json:"id,omitempty"`
InvitedUserDisplayName *string `json:"invitedUserDisplayName,omitempty"`
InvitedUserEmailAddress *string `json:"invitedUserEmailAddress,omitempty"`
SendInvitationMessage *bool `json:"sendInvitationMessage,omitempty"`
InviteRedirectURL *string `json:"inviteRedirectUrl,omitempty"`
InviteRedeemURL *string `json:"inviteRedeemUrl,omitempty"`
Status *string `json:"status,omitempty"`
InvitedUserType *string `json:"invitedUserType,omitempty"`
InvitedUserMessageInfo *InvitedUserMessageInfo `json:"invitedUserMessageInfo,omitempty"`
InvitedUser *User `json:"invitedUser,omitempty"`
}
Invitation describes a Invitation object.
type InvitationsClient ¶
type InvitationsClient struct {
BaseClient Client
}
InvitationsClient performs operations on Invitations.
func NewInvitationsClient ¶
func NewInvitationsClient(tenantId string) *InvitationsClient
NewInvitationsClient returns a new InvitationsClient.
func (*InvitationsClient) Create ¶
func (c *InvitationsClient) Create(ctx context.Context, invitation Invitation) (*Invitation, int, error)
Create creates a new Invitation.
type InvitedUserMessageInfo ¶
type KerberosSignOnSettings ¶
type KeyCredential ¶
type KeyCredential struct {
CustomKeyIdentifier *string `json:"customKeyIdentifier,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
EndDateTime *time.Time `json:"endDateTime,omitempty"`
KeyId *string `json:"keyId,omitempty"`
StartDateTime *time.Time `json:"startDateTime,omitempty"`
Type *string `json:"type,omitempty"`
Usage *string `json:"usage,omitempty"`
Key *string `json:"key,omitempty"`
}
KeyCredential describes a key (certificate) credential for an object.
type Me ¶
type Me struct {
ID *string `json:"id"`
DisplayName *string `json:"displayName"`
UserPrincipalName *string `json:"userPrincipalName"`
}
Me describes the authenticated user.
type MeClient ¶
type MeClient struct {
BaseClient Client
}
MeClient performs operations on the authenticated user.
type OnPremisesPublishing ¶
type OnPremisesPublishing struct {
AlternateUrl *string `json:"alternateUrl,omitempty"`
ApplicationServerTimeout *string `json:"applicationServerTimeout,omitempty"`
ApplicationType *string `json:"applicationType,omitempty"`
ExternalAuthenticationType *string `json:"externalAuthenticationType,omitempty"`
ExternalUrl *string `json:"externalUrl,omitempty"`
InternalUrl *string `json:"internalUrl,omitempty"`
IsHttpOnlyCookieEnabled *bool `json:"isHttpOnlyCookieEnabled,omitempty"`
IsOnPremPublishingEnabled *bool `json:"isOnPremPublishingEnabled,omitempty"`
IsPersistentCookieEnabled *bool `json:"isPersistentCookieEnabled,omitempty"`
IsSecureCookieEnabled *bool `json:"isSecureCookieEnabled,omitempty"`
IsTranslateHostHeaderEnabled *bool `json:"isTranslateHostHeaderEnabled,omitempty"`
IsTranslateLinksInBodyEnabled *bool `json:"isTranslateLinksInBodyEnabled,omitempty"`
SingleSignOnSettings *OnPremisesPublishingSingleSignOn `json:"singleSignOnSettings,omitempty"`
VerifiedCustomDomainCertificatesMetadata *OnPremisesPublishingVerifiedCustomDomainCertificatesMetadata `json:"verifiedCustomDomainCertificatesMetadata,omitempty"`
VerifiedCustomDomainKeyCredential *KeyCredential `json:"verifiedCustomDomainKeyCredential,omitempty"`
VerifiedCustomDomainPasswordCredential *PasswordCredential `json:"verifiedCustomDomainPasswordCredential,omitempty"`
}
type OnPremisesPublishingSingleSignOn ¶
type OnPremisesPublishingSingleSignOn struct {
KerberosSignOnSettings *KerberosSignOnSettings `json:"kerberosSignOnSettings,omitempty"`
SingleSignOnMode *string `json:"singleSignOnMode,omitempty"`
}
type OnPremisesPublishingVerifiedCustomDomainCertificatesMetadata ¶
type OnPremisesPublishingVerifiedCustomDomainCertificatesMetadata struct {
ExpiryDate *time.Time `json:"expiryDate,omitempty"`
IssueDate *time.Time `json:"issueDate,omitempty"`
IssuerName *string `json:"issuerName,omitempty"`
SubjectName *string `json:"subjectName,omitempty"`
Thumbprint *string `json:"thumbprint,omitempty"`
}
type OptionalClaim ¶
type OptionalClaims ¶
type OptionalClaims struct {
AccessToken *[]OptionalClaim `json:"accessToken,omitempty"`
IdToken *[]OptionalClaim `json:"idToken,omitempty"`
Saml2Token *[]OptionalClaim `json:"saml2Token,omitempty"`
}
type ParentalControlSettings ¶
type PasswordCredential ¶
type PasswordCredential struct {
CustomKeyIdentifier *string `json:"customKeyIdentifier,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
EndDateTime *time.Time `json:"endDateTime,omitempty"`
Hint *string `json:"hint,omitempty"`
KeyId *string `json:"keyId,omitempty"`
SecretText *string `json:"secretText,omitempty"`
StartDateTime *time.Time `json:"startDateTime,omitempty"`
}
PasswordCredential describes a password credential for an object.
type PasswordSingleSignOnSettings ¶
type PasswordSingleSignOnSettings struct {
Fields *[]SingleSignOnField `json:"fields,omitempty"`
}
type PatchHttpRequestInput ¶
type PatchHttpRequestInput struct {
Body []byte
ValidStatusCodes []int
ValidStatusFunc ValidStatusFunc
Uri Uri
}
PatchHttpRequestInput configures a PATCH request.
func (PatchHttpRequestInput) GetValidStatusCodes ¶
func (i PatchHttpRequestInput) GetValidStatusCodes() []int
GetValidStatusCodes returns a []int of status codes considered valid for a PATCH request.
func (PatchHttpRequestInput) GetValidStatusFunc ¶
func (i PatchHttpRequestInput) GetValidStatusFunc() ValidStatusFunc
GetValidStatusFunc returns a function used to evaluate whether the response to a PATCH request is considered valid.
type PermissionScope ¶
type PermissionScope struct {
ID *string `json:"id,omitempty"`
AdminConsentDescription *string `json:"adminConsentDescription,omitempty"`
AdminConsentDisplayName *string `json:"adminConsentDisplayName,omitempty"`
IsEnabled *bool `json:"isEnabled,omitempty"`
Type *string `json:"type,omitempty"`
UserConsentDescription *string `json:"userConsentDescription,omitempty"`
UserConsentDisplayName *string `json:"userConsentDisplayName,omitempty"`
Value *string `json:"value,omitempty"`
}
type PostHttpRequestInput ¶
type PostHttpRequestInput struct {
Body []byte
ValidStatusCodes []int
ValidStatusFunc ValidStatusFunc
Uri Uri
}
PostHttpRequestInput configures a POST request.
func (PostHttpRequestInput) GetValidStatusCodes ¶
func (i PostHttpRequestInput) GetValidStatusCodes() []int
GetValidStatusCodes returns a []int of status codes considered valid for a POST request.
func (PostHttpRequestInput) GetValidStatusFunc ¶
func (i PostHttpRequestInput) GetValidStatusFunc() ValidStatusFunc
GetValidStatusFunc returns a function used to evaluate whether the response to a POST request is considered valid.
type PublicClient ¶
type PublicClient struct {
RedirectUris *[]string `json:"redirectUris,omitempty"`
}
type PutHttpRequestInput ¶
type PutHttpRequestInput struct {
Body []byte
ValidStatusCodes []int
ValidStatusFunc ValidStatusFunc
Uri Uri
}
PutHttpRequestInput configures a PUT request.
func (PutHttpRequestInput) GetValidStatusCodes ¶
func (i PutHttpRequestInput) GetValidStatusCodes() []int
GetValidStatusCodes returns a []int of status codes considered valid for a PUT request.
func (PutHttpRequestInput) GetValidStatusFunc ¶
func (i PutHttpRequestInput) GetValidStatusFunc() ValidStatusFunc
GetValidStatusFunc returns a function used to evaluate whether the response to a PUT request is considered valid.
type Recipient ¶
type Recipient struct {
EmailAddress *EmailAddress `json:"emailAddress,omitempty"`
}
type RequiredResourceAccess ¶
type RequiredResourceAccess struct {
ResourceAccess *[]ResourceAccess `json:"resourceAccess,omitempty"`
ResourceAppId *string `json:"resourceAppId,omitempty"`
}
type ResourceAccess ¶
type SamlSingleSignOnSettings ¶
type SamlSingleSignOnSettings struct {
RelayState *string `json:"relayState,omitempty"`
}
type ServicePrincipal ¶
type ServicePrincipal struct {
ID *string `json:"id,omitempty"`
AccountEnabled *bool `json:"accountEnabled,omitempty"`
AddIns *[]AddIn `json:"addIns,omitempty"`
AlternativeNames *[]string `json:"alternativeNames,omitempty"`
AppDisplayName *string `json:"appDisplayName,omitempty"`
AppId *string `json:"appId,omitempty"`
ApplicationTemplateId *string `json:"applicationTemplateId,omitempty"`
AppOwnerOrganizationId *string `json:"appOwnerOrganizationId,omitempty"`
AppRoleAssignmentRequired *bool `json:"appRoleAssignmentRequired,omitempty"`
AppRoles *[]AppRole `json:"appRoles,omitempty"`
DeletedDateTime *time.Time `json:"deletedDateTime,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
Homepage *string `json:"homepage,omitempty"`
Info *InformationalUrl `json:"info,omitempty"`
KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"`
LoginUrl *string `json:"loginUrl,omitempty"`
LogoutUrl *string `json:"logoutUrl,omitempty"`
NotificationEmailAddresses *[]string `json:"notificationEmailAddresses,omitempty"`
PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"`
PasswordSingleSignOnSettings *PasswordSingleSignOnSettings `json:"passwordSingleSignOnSettings,omitempty"`
PreferredSingleSignOnMode *string `json:"preferredSingleSignOnMode,omitempty"`
PreferredTokenSigningKeyEndDateTime *time.Time `json:"preferredTokenSigningKeyEndDateTime,omitempty"`
PublishedPermissionScopes *[]PermissionScope `json:"publishedPermissionScopes,omitempty"`
ReplyUrls *[]string `json:"replyUrls,omitempty"`
SamlSingleSignOnSettings *SamlSingleSignOnSettings `json:"samlSingleSignOnSettings,omitempty"`
ServicePrincipalNames *[]string `json:"servicePrincipalNames,omitempty"`
ServicePrincipalType *string `json:"servicePrincipalType,omitempty"`
SignInAudience SignInAudience `json:"signInAudience,omitempty"`
Tags *[]string `json:"tags,omitempty"`
TokenEncryptionKeyId *string `json:"tokenEncryptionKeyId,omitempty"`
VerifiedPublisher *VerifiedPublisher `json:"verifiedPublisher,omitempty"`
Owners *[]string `json:"owners@odata.bind,omitempty"`
}
ServicePrincipal describes a Service Principal object.
func (*ServicePrincipal) AppendOwner ¶
func (a *ServicePrincipal) AppendOwner(endpoint string, apiVersion string, id string)
AppendOwner appends a new owner object URI to the Owners slice.
type ServicePrincipalsClient ¶
type ServicePrincipalsClient struct {
BaseClient Client
}
ServicePrincipalsClient performs operations on Service Principals.
func NewServicePrincipalsClient ¶
func NewServicePrincipalsClient(tenantId string) *ServicePrincipalsClient
NewServicePrincipalsClient returns a new ServicePrincipalsClient.
func (*ServicePrincipalsClient) AddOwners ¶
func (c *ServicePrincipalsClient) AddOwners(ctx context.Context, servicePrincipal *ServicePrincipal) (int, error)
AddOwners adds a new owner to a Service Principal. First populate the Owners field of the ServicePrincipal using the AppendOwner method of the model, then call this method.
func (*ServicePrincipalsClient) Create ¶
func (c *ServicePrincipalsClient) Create(ctx context.Context, servicePrincipal ServicePrincipal) (*ServicePrincipal, int, error)
Create creates a new Service Principal.
func (*ServicePrincipalsClient) Get ¶
func (c *ServicePrincipalsClient) Get(ctx context.Context, id string) (*ServicePrincipal, int, error)
Get retrieves a Service Principal.
func (*ServicePrincipalsClient) GetOwner ¶
func (c *ServicePrincipalsClient) GetOwner(ctx context.Context, servicePrincipalId, ownerId string) (*string, int, error)
GetOwner retrieves a single owner for the specified Service Principal. servicePrincipalId is the object ID of the service principal. ownerId is the object ID of the owning object.
func (*ServicePrincipalsClient) List ¶
func (c *ServicePrincipalsClient) List(ctx context.Context, filter string) (*[]ServicePrincipal, int, error)
List returns a list of Service Principals, optionally filtered using OData.
func (*ServicePrincipalsClient) ListGroupMemberships ¶
func (c *ServicePrincipalsClient) ListGroupMemberships(ctx context.Context, id string, filter string) (*[]Group, int, error)
ListGroupMemberships returns a list of Groups the Service Principal is member of, optionally filtered using OData.
func (*ServicePrincipalsClient) ListOwners ¶
func (c *ServicePrincipalsClient) ListOwners(ctx context.Context, id string) (*[]string, int, error)
ListOwners retrieves the owners of the specified Service Principal. id is the object ID of the service principal.
func (*ServicePrincipalsClient) RemoveOwners ¶
func (c *ServicePrincipalsClient) RemoveOwners(ctx context.Context, servicePrincipalId string, ownerIds *[]string) (int, error)
RemoveOwners removes owners from a Service Principal. servicePrincipalId is the object ID of the service principal. ownerIds is a *[]string containing object IDs of owners to remove.
func (*ServicePrincipalsClient) Update ¶
func (c *ServicePrincipalsClient) Update(ctx context.Context, servicePrincipal ServicePrincipal) (int, error)
Update amends an existing Service Principal.
type SignInAudience ¶
type SignInAudience string
const ( SignInAudienceAzureADMyOrg SignInAudience = "AzureADMyOrg" SignInAudienceAzureADMultipleOrgs SignInAudience = "AzureADMultipleOrgs" SignInAudienceAzureADandPersonalMicrosoftAccount SignInAudience = "AzureADandPersonalMicrosoftAccount" )
type SingleSignOnField ¶
type User ¶
type User struct {
ID *string `json:"id,omitempty"`
AboutMe *string `json:"aboutMe,omitempty"`
AccountEnabled *bool `json:"accountEnabled,omitempty"`
BusinessPhones *[]string `json:"businessPhones,omitempty"`
City *string `json:"city,omitempty"`
CompanyName *string `json:"companyName,omitempty"`
Country *string `json:"country,omitempty"`
CreationType *string `json:"creationType,omitempty"`
Department *string `json:"department,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
EmployeeId *string `json:"employeeId,omitempty"`
ExternalUserState *string `json:"externalUserState,omitempty"`
FaxNumber *string `json:"faxNumber,omitempty"`
GivenName *string `json:"givenName,omitempty"`
ImAddresses *[]string `json:"imAddresses,omitempty"`
Interests *[]string `json:"interests,omitempty"`
JobTitle *string `json:"jobTitle,omitempty"`
Mail *string `json:"mail,omitempty"`
MailNickname *string `json:"mailNickname,omitempty"`
MobilePhone *string `json:"mobilePhone,omitempty"`
MySite *string `json:"mySite,omitempty"`
OfficeLocation *string `json:"officeLocation,omitempty"`
OnPremisesDistinguishedName *string `json:"onPremisesDistinguishedName,omitempty"`
OnPremisesDomainName *string `json:"onPremisesDomainName,omitempty"`
OnPremisesImmutableId *string `json:"onPremisesImmutableId,omitempty"`
OnPremisesSamAccountName *string `json:"onPremisesSamAccountName,omitempty"`
OnPremisesSecurityIdentifier *string `json:"onPremisesSecurityIdentifier,omitempty"`
OnPremisesSyncEnabled *bool `json:"onPremisesSyncEnabled,omitempty"`
OnPremisesUserPrincipalName *string `json:"onPremisesUserPrincipalName,omitempty"`
OtherMails *[]string `json:"otherMails,omitempty"`
PasswordPolicies *string `json:"passwordPolicies,omitempty"`
PastProjects *[]string `json:"pastProjects,omitempty"`
PostalCode *string `json:"postalCode,omitempty"`
PreferredDataLocation *string `json:"preferredDataLocation,omitempty"`
PreferredLanguage *string `json:"preferredLanguage,omitempty"`
PreferredName *string `json:"preferredName,omitempty"`
ProxyAddresses *[]string `json:"proxyAddresses,omitempty"`
Responsibilities *[]string `json:"responsibilities,omitempty"`
Schools *[]string `json:"schools,omitempty"`
ShowInAddressList *bool `json:"showInAddressList,omitempty"`
Skills *[]string `json:"skills,omitempty"`
State *string `json:"state,omitempty"`
StreetAddress *string `json:"streetAddress,omitempty"`
Surname *string `json:"surname,omitempty"`
UsageLocation *string `json:"usageLocation,omitempty"`
UserPrincipalName *string `json:"userPrincipalName,omitempty"`
UserType *string `json:"userType,omitempty"`
PasswordProfile *UserPasswordProfile `json:"passwordProfile,omitempty"`
}
User describes a User object.
type UserPasswordProfile ¶
type UsersClient ¶
type UsersClient struct {
BaseClient Client
}
UsersClient performs operations on Users.
func NewUsersClient ¶
func NewUsersClient(tenantId string) *UsersClient
NewUsersClient returns a new UsersClient.
func (*UsersClient) ListGroupMemberships ¶
func (c *UsersClient) ListGroupMemberships(ctx context.Context, id string, filter string) (*[]Group, int, error)
ListGroupMemberships returns a list of Groups the user is member of, optionally filtered using OData.
type ValidStatusFunc ¶
ValidStatusFunc is a function that tests whether an HTTP response is considered valid for the particular request.