Documentation
¶
Index ¶
- type AddIn
- type AddInKeyValue
- type ApiPreAuthorizedApplication
- type ApiVersion
- type AppRole
- type AppRoleAllowedMemberType
- type AppRoleAssignment
- type AppRoleAssignmentsClient
- func (c *AppRoleAssignmentsClient) Assign(ctx context.Context, ...) (*AppRoleAssignment, int, error)
- func (c *AppRoleAssignmentsClient) List(ctx context.Context, id string) (*[]AppRoleAssignment, int, error)
- func (c *AppRoleAssignmentsClient) Remove(ctx context.Context, id, appRoleAssignmentId string) (int, error)
- type Application
- func (a *Application) AppendAppRole(role AppRole) error
- func (a *Application) AppendOwner(endpoint environments.ApiEndpoint, apiVersion ApiVersion, id string)
- func (a Application) MarshalJSON() ([]byte, error)
- func (a *Application) RemoveAppRole(role AppRole) error
- func (a *Application) UnmarshalJSON(data []byte) error
- func (a *Application) UnmarshalJSON2(data []byte) error
- func (a *Application) UpdateAppRole(role AppRole) error
- type ApplicationApi
- type ApplicationEnforcedRestrictionsSessionControl
- type ApplicationWeb
- type ApplicationsClient
- func (c *ApplicationsClient) AddOwners(ctx context.Context, application *Application) (int, error)
- func (c *ApplicationsClient) AddPassword(ctx context.Context, applicationId string, ...) (*PasswordCredential, 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) GetDeleted(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) ListDeleted(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) RemovePassword(ctx context.Context, applicationId string, keyId string) (int, error)
- func (c *ApplicationsClient) Update(ctx context.Context, application Application) (int, error)
- type BaseNamedLocation
- type BodyType
- 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 CloudAppSecurityControl
- type ConditionalAccessApplications
- type ConditionalAccessConditionSet
- type ConditionalAccessGrantControls
- type ConditionalAccessLocations
- type ConditionalAccessPlatforms
- type ConditionalAccessPolicy
- type ConditionalAccessPolicyClient
- func (c *ConditionalAccessPolicyClient) Create(ctx context.Context, conditionalAccessPolicy ConditionalAccessPolicy) (*ConditionalAccessPolicy, int, error)
- func (c *ConditionalAccessPolicyClient) Delete(ctx context.Context, id string) (int, error)
- func (c *ConditionalAccessPolicyClient) Get(ctx context.Context, id string) (*ConditionalAccessPolicy, int, error)
- func (c *ConditionalAccessPolicyClient) List(ctx context.Context, filter string) (*[]ConditionalAccessPolicy, int, error)
- func (c *ConditionalAccessPolicyClient) Update(ctx context.Context, conditionalAccessPolicy ConditionalAccessPolicy) (int, error)
- type ConditionalAccessSessionControls
- type ConditionalAccessUsers
- type CountryNamedLocation
- type DeleteHttpRequestInput
- type DirectoryRole
- type DirectoryRoleTemplate
- type DirectoryRoleTemplatesClient
- type DirectoryRolesClient
- func (c *DirectoryRolesClient) Activate(ctx context.Context, roleTemplateID string) (*DirectoryRole, int, error)
- func (c *DirectoryRolesClient) AddMembers(ctx context.Context, directoryRole *DirectoryRole) (int, error)
- func (c *DirectoryRolesClient) Get(ctx context.Context, id string) (*DirectoryRole, int, error)
- func (c *DirectoryRolesClient) GetMember(ctx context.Context, directoryRoleId, memberId string) (*string, int, error)
- func (c *DirectoryRolesClient) List(ctx context.Context) (*[]DirectoryRole, int, error)
- func (c *DirectoryRolesClient) ListMembers(ctx context.Context, id string) (*[]string, int, error)
- func (c *DirectoryRolesClient) RemoveMembers(ctx context.Context, directoryRoleId string, memberIds *[]string) (int, error)
- type Domain
- type DomainState
- type DomainsClient
- type EmailAddress
- type GetHttpRequestInput
- type Group
- type GroupAssignedLabel
- type GroupAssignedLicense
- type GroupMembershipClaim
- 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) GetDeleted(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) ListDeleted(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 IPNamedLocation
- type IPNamedLocationIPRange
- type IdentityProvider
- type IdentityProvidersClient
- func (c *IdentityProvidersClient) Create(ctx context.Context, provider IdentityProvider) (*IdentityProvider, int, error)
- func (c *IdentityProvidersClient) Delete(ctx context.Context, id string) (int, error)
- func (c *IdentityProvidersClient) Get(ctx context.Context, id string) (*IdentityProvider, int, error)
- func (c *IdentityProvidersClient) List(ctx context.Context) (*[]IdentityProvider, int, error)
- func (c *IdentityProvidersClient) ListAvailableProviderTypes(ctx context.Context) (*[]string, int, error)
- func (c *IdentityProvidersClient) Update(ctx context.Context, provider IdentityProvider) (int, error)
- type ImplicitGrantSettings
- type InformationalUrl
- type Invitation
- type InvitationsClient
- type InvitedUserMessageInfo
- type ItemBody
- type KerberosSignOnSettings
- type KeyCredential
- type KeyCredentialType
- type KeyCredentialUsage
- type MailMessage
- type Me
- type MeClient
- type Message
- type NamedLocation
- type NamedLocationsClient
- func (c *NamedLocationsClient) CreateCountry(ctx context.Context, countryNamedLocation CountryNamedLocation) (*CountryNamedLocation, int, error)
- func (c *NamedLocationsClient) CreateIP(ctx context.Context, ipNamedLocation IPNamedLocation) (*IPNamedLocation, int, error)
- func (c *NamedLocationsClient) Delete(ctx context.Context, id string) (int, error)
- func (c *NamedLocationsClient) GetCountry(ctx context.Context, id string) (*CountryNamedLocation, int, error)
- func (c *NamedLocationsClient) GetIP(ctx context.Context, id string) (*IPNamedLocation, int, error)
- func (c *NamedLocationsClient) List(ctx context.Context, filter string) (*[]NamedLocation, int, error)
- func (c *NamedLocationsClient) UpdateCountry(ctx context.Context, countryNamedLocation CountryNamedLocation) (int, error)
- func (c *NamedLocationsClient) UpdateIP(ctx context.Context, ipNamedLocation IPNamedLocation) (int, error)
- type OnPremisesPublishing
- type OnPremisesPublishingSingleSignOn
- type OnPremisesPublishingVerifiedCustomDomainCertificatesMetadata
- type OptionalClaim
- type OptionalClaims
- type ParentalControlSettings
- type PasswordCredential
- type PasswordSingleSignOnSettings
- type PatchHttpRequestInput
- type PermissionScope
- type PermissionScopeType
- type PersistentBrowserSessionControl
- type PostHttpRequestInput
- type PublicClient
- type PutHttpRequestInput
- type Recipient
- type RequiredResourceAccess
- type ResourceAccess
- type ResourceAccessType
- type SamlSingleSignOnSettings
- type ServicePrincipal
- type ServicePrincipalsClient
- func (c *ServicePrincipalsClient) AddOwners(ctx context.Context, servicePrincipal *ServicePrincipal) (int, error)
- func (c *ServicePrincipalsClient) AddPassword(ctx context.Context, servicePrincipalId string, ...) (*PasswordCredential, int, error)
- func (c *ServicePrincipalsClient) AssignAppRoleForResource(ctx context.Context, principalId, resourceId, appRoleId string) (*AppRoleAssignment, 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) ListAppRoleAssignments(ctx context.Context, resourceId string) (*[]AppRoleAssignment, int, error)
- func (c *ServicePrincipalsClient) ListGroupMemberships(ctx context.Context, id string, filter string) (*[]Group, int, error)
- func (c *ServicePrincipalsClient) ListOwnedObjects(ctx context.Context, id string) (*[]string, int, error)
- func (c *ServicePrincipalsClient) ListOwners(ctx context.Context, id string) (*[]string, int, error)
- func (c *ServicePrincipalsClient) RemoveAppRoleAssignment(ctx context.Context, resourceId, appRoleAssignmentId string) (int, error)
- func (c *ServicePrincipalsClient) RemoveOwners(ctx context.Context, servicePrincipalId string, ownerIds *[]string) (int, error)
- func (c *ServicePrincipalsClient) RemovePassword(ctx context.Context, servicePrincipalId string, keyId string) (int, error)
- func (c *ServicePrincipalsClient) Update(ctx context.Context, servicePrincipal ServicePrincipal) (int, error)
- type SignInAudience
- type SignInFrequencySessionControl
- 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) GetDeleted(ctx context.Context, id string) (*User, int, error)
- func (c *UsersClient) List(ctx context.Context, filter string) (*[]User, int, error)
- func (c *UsersClient) ListDeleted(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) Sendmail(ctx context.Context, id string, message MailMessage) (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 *[]AppRoleAllowedMemberType `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 AppRoleAllowedMemberType ¶
type AppRoleAllowedMemberType string
const ( AppRoleAllowedMemberTypeApplication AppRoleAllowedMemberType = "Application" AppRoleAllowedMemberTypeUser AppRoleAllowedMemberType = "User" )
type AppRoleAssignment ¶
type AppRoleAssignment struct { Id *string `json:"id,omitempty"` DeletedDateTime *time.Time `json:"deletedDateTime,omitempty"` AppRoleId *string `json:"appRoleId,omitempty"` CreatedDateTime *time.Time `json:"createdDateTime,omitempty"` PrincipalDisplayName *string `json:"principalDisplayName,omitempty"` PrincipalId *string `json:"principalId,omitempty"` PrincipalType *string `json:"principalType,omitempty"` ResourceDisplayName *string `json:"resourceDisplayName,omitempty"` ResourceId *string `json:"resourceId,omitempty"` }
type AppRoleAssignmentsClient ¶
type AppRoleAssignmentsClient struct { BaseClient Client // contains filtered or unexported fields }
AppRoleAssignmentsClient performs operations on AppRoleAssignments.
func NewGroupsAppRoleAssignmentsClient ¶
func NewGroupsAppRoleAssignmentsClient(tenantId string) *AppRoleAssignmentsClient
NewGroupsAppRoleAssignmentsClient returns a new AppRoleAssignmentsClient for groups assignments
func NewServicePrincipalsAppRoleAssignmentsClient ¶
func NewServicePrincipalsAppRoleAssignmentsClient(tenantId string) *AppRoleAssignmentsClient
NewServicePrincipalsAppRoleAssignmentsClient returns a new AppRoleAssignmentsClient for service principal assignments
func NewUsersAppRoleAssignmentsClient ¶
func NewUsersAppRoleAssignmentsClient(tenantId string) *AppRoleAssignmentsClient
NewUsersAppRoleAssignmentsClient returns a new AppRoleAssignmentsClient for users assignments
func (*AppRoleAssignmentsClient) Assign ¶
func (c *AppRoleAssignmentsClient) Assign(ctx context.Context, clientServicePrincipalId, resourceServicePrincipalId, appRoleId string) (*AppRoleAssignment, int, error)
Assign assigns an app role to a user, group or service principal depending on client resource type.
func (*AppRoleAssignmentsClient) List ¶
func (c *AppRoleAssignmentsClient) List(ctx context.Context, id string) (*[]AppRoleAssignment, int, error)
List returns a list of app role assignments.
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"` DefaultRedirectUri *string `json:"defaultRedirectUri,omitempty"` DeletedDateTime *time.Time `json:"deletedDateTime,omitempty"` DisabledByMicrosoftStatus interface{} `json:"disabledByMicrosoftStatus,omitempty"` DisplayName *string `json:"displayName,omitempty"` GroupMembershipClaims *[]GroupMembershipClaim `json:"groupMembershipClaims,omitempty"` IdentifierUris *[]string `json:"identifierUris,omitempty"` Info *InformationalUrl `json:"info,omitempty"` IsAuthorizationServiceEnabled *bool `json:"isAuthorizationServiceEnabled,omitempty"` IsDeviceOnlyAuthSupported *bool `json:"isDeviceOnlyAuthSupported,omitempty"` IsFallbackPublicClient *bool `json:"isFallbackPublicClient,omitempty"` IsManagementRestricted *bool `json:"isManagementRestricted,omitempty"` KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"` Oauth2RequirePostResponse *bool `json:"oauth2RequirePostResponse,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"` UniqueName *string `json:"uniqueName,omitempty"` VerifiedPublisher *VerifiedPublisher `json:"verifiedPublisher,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) MarshalJSON ¶
func (a Application) MarshalJSON() ([]byte, error)
func (*Application) RemoveAppRole ¶
func (a *Application) RemoveAppRole(role AppRole) error
RemoveAppRole removes an AppRole from an Application.
func (*Application) UnmarshalJSON ¶
func (a *Application) UnmarshalJSON(data []byte) error
func (*Application) UnmarshalJSON2 ¶
func (a *Application) UnmarshalJSON2(data []byte) error
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 ApplicationEnforcedRestrictionsSessionControl ¶
type ApplicationEnforcedRestrictionsSessionControl struct {
IsEnabled *bool `json:"isEnabled,omitempty"`
}
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) 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) AddPassword ¶
func (c *ApplicationsClient) AddPassword(ctx context.Context, applicationId string, passwordCredential PasswordCredential) (*PasswordCredential, int, error)
AddPassword appends a new password credential to an Application.
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) GetDeleted ¶
func (c *ApplicationsClient) GetDeleted(ctx context.Context, id string) (*Application, int, error)
GetDeleted retrieves a deleted Application manifest. id is the object ID of the application.
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) ListDeleted ¶
func (c *ApplicationsClient) ListDeleted(ctx context.Context, filter string) (*[]Application, int, error)
ListDeleted retrieves a list of recently deleted 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) RemovePassword ¶
func (c *ApplicationsClient) RemovePassword(ctx context.Context, applicationId string, keyId string) (int, error)
RemovePassword removes a password credential from an Application.
func (*ApplicationsClient) Update ¶
func (c *ApplicationsClient) Update(ctx context.Context, application Application) (int, error)
Update amends the manifest of an existing Application.
type BaseNamedLocation ¶
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 CloudAppSecurityControl ¶
type ConditionalAccessConditionSet ¶
type ConditionalAccessConditionSet struct { Applications *ConditionalAccessApplications `json:"applications,omitempty"` Users *ConditionalAccessUsers `json:"users,omitempty"` ClientAppTypes *[]string `json:"clientAppTypes,omitempty"` Locations *ConditionalAccessLocations `json:"locations,omitempty"` Platforms *ConditionalAccessPlatforms `json:"platforms,omitempty"` SignInRiskLevels *[]string `json:"signInRiskLevels,omitempty"` UserRiskLevels *[]string `json:"userRiskLevels,omitempty"` }
type ConditionalAccessPolicy ¶
type ConditionalAccessPolicy struct { Conditions *ConditionalAccessConditionSet `json:"conditions,omitempty"` CreatedDateTime *time.Time `json:"createdDateTime,omitempty"` DisplayName *string `json:"displayName,omitempty"` GrantControls *ConditionalAccessGrantControls `json:"grantControls,omitempty"` ID *string `json:"id,omitempty"` ModifiedDateTime *time.Time `json:"modifiedDateTime,omitempty"` SessionControls *ConditionalAccessSessionControls `json:"sessionControls,omitempty"` State *string `json:"state,omitempty"` }
ConditionalAccessPolicy describes an Conditional Access Policy object.
type ConditionalAccessPolicyClient ¶
type ConditionalAccessPolicyClient struct {
BaseClient Client
}
ConditionalAccessPolicyClient performs operations on ConditionalAccessPolicy.
func NewConditionalAccessPolicyClient ¶
func NewConditionalAccessPolicyClient(tenantId string) *ConditionalAccessPolicyClient
NewConditionalAccessPolicyClient returns a new ConditionalAccessPolicyClient
func (*ConditionalAccessPolicyClient) Create ¶
func (c *ConditionalAccessPolicyClient) Create(ctx context.Context, conditionalAccessPolicy ConditionalAccessPolicy) (*ConditionalAccessPolicy, int, error)
Create creates a new ConditionalAccessPolicy.
func (*ConditionalAccessPolicyClient) Get ¶
func (c *ConditionalAccessPolicyClient) Get(ctx context.Context, id string) (*ConditionalAccessPolicy, int, error)
Get retrieves an ConditionalAccessPolicy.
func (*ConditionalAccessPolicyClient) List ¶
func (c *ConditionalAccessPolicyClient) List(ctx context.Context, filter string) (*[]ConditionalAccessPolicy, int, error)
List returns a list of ConditionalAccessPolicys, optionally filtered using OData.
func (*ConditionalAccessPolicyClient) Update ¶
func (c *ConditionalAccessPolicyClient) Update(ctx context.Context, conditionalAccessPolicy ConditionalAccessPolicy) (int, error)
Update amends an existing ConditionalAccessPolicy.
type ConditionalAccessSessionControls ¶
type ConditionalAccessSessionControls struct { ApplicationEnforcedRestrictions *ApplicationEnforcedRestrictionsSessionControl `json:"applicationEnforcedRestrictions,omitempty"` CloudAppSecurity *CloudAppSecurityControl `json:"cloudAppSecurity,omitempty"` PersistentBrowser *PersistentBrowserSessionControl `json:"persistentBrowser,omitempty"` SignInFrequency *SignInFrequencySessionControl `json:"signInFrequency,omitempty"` }
type ConditionalAccessUsers ¶
type ConditionalAccessUsers struct { IncludeUsers *[]string `json:"includeUsers,omitempty"` ExcludeUsers *[]string `json:"excludeUsers,omitempty"` IncludeGroups *[]string `json:"includeGroups,omitempty"` ExcludeGroups *[]string `json:"excludeGroups,omitempty"` IncludeRoles *[]string `json:"includeRoles,omitempty"` ExcludeRoles *[]string `json:"excludeRoles,omitempty"` }
type CountryNamedLocation ¶
type CountryNamedLocation struct { *BaseNamedLocation CountriesAndRegions *[]string `json:"countriesAndRegions,omitempty"` IncludeUnknownCountriesAndRegions *bool `json:"includeUnknownCountriesAndRegions,omitempty"` }
CountryNamedLocation describes an Country Named Location object.
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 DirectoryRole ¶
type DirectoryRole struct { ID *string `json:"id,omitempty"` Description *string `json:"description,omitempty"` DisplayName *string `json:"displayName,omitempty"` RoleTemplateId *string `json:"roleTemplateId,omitempty"` Members *[]string `json:"-"` }
func (*DirectoryRole) AppendMember ¶
func (d *DirectoryRole) AppendMember(endpoint environments.ApiEndpoint, apiVersion ApiVersion, id string)
AppendMember appends a new member object URI to the Members slice.
type DirectoryRoleTemplate ¶
type DirectoryRoleTemplate struct { ID *string `json:"id,omitempty"` DeletedDateTime *time.Time `json:"deletedDateTime,omitempty"` Description *string `json:"description,omitempty"` DisplayName *string `json:"displayName,omitempty"` }
DirectoryRoleTemplate describes a Directory Role Template.
type DirectoryRoleTemplatesClient ¶
type DirectoryRoleTemplatesClient struct {
BaseClient Client
}
DirectoryRoleTemplatesClient performs operations on DirectoryRoleTemplates.
func NewDirectoryRoleTemplatesClient ¶
func NewDirectoryRoleTemplatesClient(tenantId string) *DirectoryRoleTemplatesClient
NewDirectoryRoleTemplatesClient returns a new DirectoryRoleTemplatesClient
func (*DirectoryRoleTemplatesClient) Get ¶
func (c *DirectoryRoleTemplatesClient) Get(ctx context.Context, id string) (*DirectoryRoleTemplate, int, error)
Get retrieves an DirectoryRoleTemplates manifest.
func (*DirectoryRoleTemplatesClient) List ¶
func (c *DirectoryRoleTemplatesClient) List(ctx context.Context) (*[]DirectoryRoleTemplate, int, error)
List returns a list of DirectoryRoleTemplates.
type DirectoryRolesClient ¶
type DirectoryRolesClient struct {
BaseClient Client
}
DirectoryRolesClient performs operations on DirectoryRoles.
func NewDirectoryRolesClient ¶
func NewDirectoryRolesClient(tenantId string) *DirectoryRolesClient
NewDirectoryRolesClient returns a new DirectoryRolesClient
func (*DirectoryRolesClient) Activate ¶
func (c *DirectoryRolesClient) Activate(ctx context.Context, roleTemplateID string) (*DirectoryRole, int, error)
Activate activates a directory role. To read a directory role or update its members, it must first be activated in the tenant using role template id. This method will attempt to detect whether a role is already activated in the tenant, but may fail in some circumstances.
func (*DirectoryRolesClient) AddMembers ¶
func (c *DirectoryRolesClient) AddMembers(ctx context.Context, directoryRole *DirectoryRole) (int, error)
AddMembers adds a new member to a Directory Role. First populate the Members field of the DirectoryRole using the AppendMember method of the model, then call this method.
func (*DirectoryRolesClient) Get ¶
func (c *DirectoryRolesClient) Get(ctx context.Context, id string) (*DirectoryRole, int, error)
Get retrieves an DirectoryRoles manifest.
func (*DirectoryRolesClient) GetMember ¶
func (c *DirectoryRolesClient) GetMember(ctx context.Context, directoryRoleId, memberId string) (*string, int, error)
GetMember retrieves a single member of the specified DirectoryRole. directoryRoleId is the object ID of the directory role. memberId is the object ID of the member object.
func (*DirectoryRolesClient) List ¶
func (c *DirectoryRolesClient) List(ctx context.Context) (*[]DirectoryRole, int, error)
List returns a list of DirectoryRoles activated in the tenant.
func (*DirectoryRolesClient) ListMembers ¶
ListMembers retrieves the members of the specified directory role. id is the object ID of the directory role.
func (*DirectoryRolesClient) RemoveMembers ¶
func (c *DirectoryRolesClient) RemoveMembers(ctx context.Context, directoryRoleId string, memberIds *[]string) (int, error)
RemoveMembers removes members from a Directory Role. id is the object ID of the Directory Role. memberIds is a *[]string containing object IDs of members to remove.
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"` IsAssignableToRole *bool `json:"isAssignableToRole,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 GroupMembershipClaim ¶
type GroupMembershipClaim string
const ( GroupMembershipClaimAll GroupMembershipClaim = "All" GroupMembershipClaimNone GroupMembershipClaim = "None" GroupMembershipClaimApplicationGroup GroupMembershipClaim = "ApplicationGroup" GroupMembershipClaimDirectoryRole GroupMembershipClaim = "DirectoryRole" GroupMembershipClaimSecurityGroup GroupMembershipClaim = "SecurityGroup" )
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) GetDeleted ¶
GetDeleted retrieves a deleted O365 Group.
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) ListDeleted ¶
ListDeleted retrieves a list of recently deleted O365 groups, optionally filtered using OData. TODO: add test coverage once API supports creating O365 groups
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 IPNamedLocation ¶
type IPNamedLocation struct { *BaseNamedLocation IPRanges *[]IPNamedLocationIPRange `json:"ipRanges,omitempty"` IsTrusted *bool `json:"isTrusted,omitempty"` }
IPNamedLocation describes an IP Named Location object.
type IPNamedLocationIPRange ¶
type IPNamedLocationIPRange struct {
CIDRAddress *string `json:"cidrAddress,omitempty"`
}
type IdentityProvider ¶
type IdentityProvider struct { ODataType *string `json:"@odata.type,omitempty"` ID *string `json:"id,omitempty"` ClientId *string `json:"clientId,omitempty"` ClientSecret *string `json:"clientSecret,omitempty"` Type *string `json:"identityProviderType,omitempty"` Name *string `json:"displayName,omitempty"` }
type IdentityProvidersClient ¶
type IdentityProvidersClient struct {
BaseClient Client
}
IdentityProvidersClient performs operations on IdentityProviders.
func NewIdentityProvidersClient ¶
func NewIdentityProvidersClient(tenantId string) *IdentityProvidersClient
NewIdentityProvidersClient returns a new IdentityProvidersClient
func (*IdentityProvidersClient) Create ¶
func (c *IdentityProvidersClient) Create(ctx context.Context, provider IdentityProvider) (*IdentityProvider, int, error)
Create creates a new IdentityProvider.
func (*IdentityProvidersClient) Get ¶
func (c *IdentityProvidersClient) Get(ctx context.Context, id string) (*IdentityProvider, int, error)
Get retrieves an IdentityProvider.
func (*IdentityProvidersClient) List ¶
func (c *IdentityProvidersClient) List(ctx context.Context) (*[]IdentityProvider, int, error)
List returns a list of IdentityProviders.
func (*IdentityProvidersClient) ListAvailableProviderTypes ¶
func (c *IdentityProvidersClient) ListAvailableProviderTypes(ctx context.Context) (*[]string, int, error)
List returns a list of all available identity provider types.
func (*IdentityProvidersClient) Update ¶
func (c *IdentityProvidersClient) Update(ctx context.Context, provider IdentityProvider) (int, error)
Update amends an existing IdentityProvider.
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 KeyCredentialType `json:"type"` Usage KeyCredentialUsage `json:"usage"` Key *string `json:"key,omitempty"` }
KeyCredential describes a key (certificate) credential for an object.
type KeyCredentialType ¶
type KeyCredentialType string
const ( KeyCredentialTypeAsymmetricX509Cert KeyCredentialType = "AsymmetricX509Cert" KeyCredentialTypeX509CertAndPassword KeyCredentialType = "X509CertAndPassword" )
type KeyCredentialUsage ¶
type KeyCredentialUsage string
const ( KeyCredentialUsageSign KeyCredentialUsage = "Sign" KeyCredentialUsageVerify KeyCredentialUsage = "Verify" )
type MailMessage ¶
type MailMessage struct {
Message *Message `json:"message,omitempty"`
}
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.
func (*MeClient) GetProfile ¶
GetProfile retrieves the profile of the authenticated user.
type Message ¶
type Message struct { ID *string `json:"id,omitempty"` Subject *string `json:"subject,omitempty"` Body *ItemBody `json:"body,omitempty"` From *Recipient `json:"from,omitempty"` ToRecipients *[]Recipient `json:"toRecipients,omitempty"` CcRecipients *[]Recipient `json:"ccRecipients,omitempty"` BccRecipients *[]Recipient `json:"bccRecipients,omitempty"` }
type NamedLocation ¶
type NamedLocation interface{}
type NamedLocationsClient ¶
type NamedLocationsClient struct {
BaseClient Client
}
NamedLocationsClient performs operations on Named Locations.
func NewNamedLocationsClient ¶
func NewNamedLocationsClient(tenantId string) *NamedLocationsClient
NewNamedLocationsClient returns a new NamedLocationsClient.
func (*NamedLocationsClient) CreateCountry ¶
func (c *NamedLocationsClient) CreateCountry(ctx context.Context, countryNamedLocation CountryNamedLocation) (*CountryNamedLocation, int, error)
CreateCountry creates a new Country Named Location.
func (*NamedLocationsClient) CreateIP ¶
func (c *NamedLocationsClient) CreateIP(ctx context.Context, ipNamedLocation IPNamedLocation) (*IPNamedLocation, int, error)
CreateIP creates a new IP Named Location.
func (*NamedLocationsClient) GetCountry ¶
func (c *NamedLocationsClient) GetCountry(ctx context.Context, id string) (*CountryNamedLocation, int, error)
GetCountry retrieves an Country Named Location.
func (*NamedLocationsClient) GetIP ¶
func (c *NamedLocationsClient) GetIP(ctx context.Context, id string) (*IPNamedLocation, int, error)
GetIP retrieves an IP Named Location.
func (*NamedLocationsClient) List ¶
func (c *NamedLocationsClient) List(ctx context.Context, filter string) (*[]NamedLocation, int, error)
List returns a list of Named Locations, optionally filtered using OData.
func (*NamedLocationsClient) UpdateCountry ¶
func (c *NamedLocationsClient) UpdateCountry(ctx context.Context, countryNamedLocation CountryNamedLocation) (int, error)
UpdateCountry amends an existing Country Named Location.
func (*NamedLocationsClient) UpdateIP ¶
func (c *NamedLocationsClient) UpdateIP(ctx context.Context, ipNamedLocation IPNamedLocation) (int, error)
UpdateIP amends an existing IP Named Location.
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 PermissionScopeType `json:"type,omitempty"` UserConsentDescription *string `json:"userConsentDescription,omitempty"` UserConsentDisplayName *string `json:"userConsentDisplayName,omitempty"` Value *string `json:"value,omitempty"` }
type PermissionScopeType ¶
type PermissionScopeType string
const ( PermissionScopeTypeAdmin PermissionScopeType = "Admin" PermissionScopeTypeUser PermissionScopeType = "User" )
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 ResourceAccess struct { ID *string `json:"id,omitempty"` Type ResourceAccessType `json:"type,omitempty"` }
type ResourceAccessType ¶
type ResourceAccessType string
const ( ResourceAccessTypeRole ResourceAccessType = "Role" ResourceAccessTypeScope ResourceAccessType = "Scope" )
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) AddPassword ¶
func (c *ServicePrincipalsClient) AddPassword(ctx context.Context, servicePrincipalId string, passwordCredential PasswordCredential) (*PasswordCredential, int, error)
AddPassword appends a new password credential to a Service Principal.
func (*ServicePrincipalsClient) AssignAppRoleForResource ¶
func (c *ServicePrincipalsClient) AssignAppRoleForResource(ctx context.Context, principalId, resourceId, appRoleId string) (*AppRoleAssignment, int, error)
AssignAppRoleForResource assigns an app role for a resource service principal, to a user, group, or client service principal. To grant an app role assignment, you need three identifiers:
principalId: The id of the user, group or client servicePrincipal to which you are assigning the app role. resourceId: The id of the resource servicePrincipal which has defined the app role. appRoleId: The id of the appRole (defined on the resource service principal) to assign to a user, group, or service principal.
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) ListAppRoleAssignments ¶
func (c *ServicePrincipalsClient) ListAppRoleAssignments(ctx context.Context, resourceId string) (*[]AppRoleAssignment, int, error)
ListAppRoleAssignments retrieves a list of appRoleAssignment that users, groups, or client service principals have been granted for the given resource service principal.
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) ListOwnedObjects ¶
func (c *ServicePrincipalsClient) ListOwnedObjects(ctx context.Context, id string) (*[]string, int, error)
ListOwnedObjects retrieves the owned objects of the specified Service Principal. id is the object ID of the service principal.
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) RemoveAppRoleAssignment ¶
func (c *ServicePrincipalsClient) RemoveAppRoleAssignment(ctx context.Context, resourceId, appRoleAssignmentId string) (int, error)
RemoveAppRoleAssignment deletes an appRoleAssignment that a user, group, or client service principal has been granted for a resource 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) RemovePassword ¶
func (c *ServicePrincipalsClient) RemovePassword(ctx context.Context, servicePrincipalId string, keyId string) (int, error)
RemovePassword removes a password credential from a Service Principal.
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"` CreatedDateTime *time.Time `json:"createdDateTime,omitempty"` CreationType *string `json:"creationType,omitempty"` DeletedDateTime *time.Time `json:"deletedDateTime,omitempty"` Department *string `json:"department,omitempty"` DisplayName *string `json:"displayName,omitempty"` EmployeeHireDate *time.Time `json:"employeeHireDate,omitempty"` EmployeeId *string `json:"employeeId,omitempty"` EmployeeType *string `json:"employeeType,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"` IsManagementRestricted *bool `json:"isManagementRestricted,omitempty"` IsResourceAccount *bool `json:"isResourceAccount,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"` OnPremisesLastSyncDateTime *string `json:"onPremisesLastSyncDateTime,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"` RefreshTokensValidFromDateTime *time.Time `json:"refreshTokensValidFromDateTime,omitempty"` Responsibilities *[]string `json:"responsibilities,omitempty"` Schools *[]string `json:"schools,omitempty"` ShowInAddressList *bool `json:"showInAddressList,omitempty"` SignInSessionsValidFromDateTime *time.Time `json:"signInSessionsValidFromDateTime,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) GetDeleted ¶
GetDeleted retrieves a deleted User.
func (*UsersClient) ListDeleted ¶
ListDeleted retrieves a list of recently deleted users, optionally filtered using OData.
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.
func (*UsersClient) Sendmail ¶
func (c *UsersClient) Sendmail(ctx context.Context, id string, message MailMessage) (int, error)
SendMail sends message specified in the request body. TODO: Needs testing with an O365 user principal
type ValidStatusFunc ¶
ValidStatusFunc is a function that tests whether an HTTP response is considered valid for the particular request.