Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrorAddedObjectReferencesAlreadyExist = "One or more added object references already exist" ErrorCannotDeleteOrUpdateEnabledEntitlement = "Permission (scope or role) cannot be deleted or updated unless disabled first" ErrorConflictingObjectPresentInDirectory = "A conflicting object with one or more of the specified property values is present in the directory" ErrorNotValidReferenceUpdate = "Not a valid reference update" ErrorResourceDoesNotExist = "Resource '.+' does not exist or one of its queried reference-property objects are not present" ErrorRemovedObjectReferencesDoNotExist = "One or more removed object references do not exist" ErrorServicePrincipalAppInOtherTenant = "When using this permission, the backing application of the service principal being created must in the local tenant" ErrorServicePrincipalInvalidAppId = "The appId '.+' of the service principal does not reference a valid application object" ErrorUnknownUnsupportedQuery = "UnknownError: Unsupported Query" )
View Source
const ODataVersion = "4.0" // TODO: support 4.01 - https://docs.oasis-open.org/odata/odata-json-format/v4.01/cs01/odata-json-format-v4.01-cs01.html#_Toc499720587
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsistencyLevel ¶ added in v0.32.0
type ConsistencyLevel string
const (
ConsistencyLevelEventual ConsistencyLevel = "eventual"
)
type Error ¶
type Error struct {
Code *string `json:"code"`
Date *string `json:"date"`
Message *string `json:"-"`
RawMessage *json.RawMessage `json:"message"` // sometimes a string, sometimes an object :/
ClientRequestId *string `json:"client-request-id"`
RequestId *string `json:"request-id"`
InnerError *Error `json:"innerError"` // nested errors
Details *[]struct {
Code *string `json:"code"`
Target *string `json:"target"`
} `json:"details"`
Values *[]struct {
Item string `json:"item"`
Value string `json:"value"`
} `json:"values"`
}
Error is used to unmarshal an API error message.
func (*Error) UnmarshalJSON ¶
type Id ¶ added in v0.24.0
type Id string
func (Id) MarshalJSON ¶ added in v0.33.0
func (*Id) UnmarshalJSON ¶ added in v0.24.0
type OData ¶
type OData struct {
Context *string `json:"@odata.context"`
MetadataEtag *string `json:"@odata.metadataEtag"`
Type *Type `json:"@odata.type"`
Count *int `json:"@odata.count"`
NextLink *string `json:"@odata.nextLink"`
Delta *string `json:"@odata.delta"`
DeltaLink *string `json:"@odata.deltaLink"`
Id *Id `json:"@odata.id"`
EditLink *Link `json:"@odata.editLink"`
Etag *string `json:"@odata.etag"`
Error *Error `json:"-"`
Value interface{} `json:"value"`
}
OData is used to unmarshall OData metadata from an API response.
func FromResponse ¶
FromResponse parses an http.Response and returns an unmarshalled OData If no odata is present in the response, or the content type is invalid, returns nil
func (*OData) UnmarshalJSON ¶
type Query ¶ added in v0.18.0
type Query struct {
// ConsistencyLevel sets the corresponding http header
ConsistencyLevel ConsistencyLevel
// Metadata indicates how much control information is requested (services assume "minimal" when not specified)
Metadata Metadata
// Count includes a count of the total number of items in a collection alongside the page of data values
Count bool
// Expand includes the expanded resource or collection referenced by a single relationship
Expand Expand
// Filter retrieves just a subset of a collection, or relationships like members, memberOf, transitiveMembers, and transitiveMemberOf
Filter string
// Format specifies the media format of the items returned
Format Format
// OrderBy specify the sort order of the items returned
OrderBy OrderBy
// Search restricts the results of a request to match a search criterion
Search string // complicated
// Select returns a set of properties that are different than the default set for an individual resource or a collection of resources
Select []string
// Skip sets the number of items to skip at the start of a collection
Skip int
// Top specifies the page size of the result set
Top int
}
func (Query) AppendHeaders ¶ added in v0.32.0
AppendHeaders returns the provided http.Header map with OData specific headers appended, for use in requests
func (Query) AppendValues ¶ added in v0.32.0
AppendValues returns the provided url.Values map with OData specific query parameters appended, for use in requests
type ShortType ¶ added in v0.24.0
type ShortType = string
const ( ShortTypeAccessPackage ShortType = "accessPackage" ShortTypeAccessPackageAssignmentPolicy ShortType = "accessPackageAssignmentPolicy" ShortTypeAccessPackageCatalog ShortType = "accessPackageCatalog" ShortTypeAccessPackageResourceRequest ShortType = "accessPackageResourceRequest" ShortTypeAccessPackageQuestion ShortType = "accessPackageQuestion" ShortTypeAccessPackageTextInputQuestion ShortType = "accessPackageTextInputQuestion" ShortTypeAccessPackageMultipleChoiceQuestion ShortType = "accessPackageMultipleChoiceQuestion" ShortTypeAdministrativeUnit ShortType = "administrativeUnit" ShortTypeApplication ShortType = "application" ShortTypeConditionalAccessPolicy ShortType = "conditionalAccessPolicy" ShortTypeConnectedOrganizationMembers ShortType = "connectedOrganizationMembers" ShortTypeConnectionInfo ShortType = "connectionInfo" ShortTypeCountryNamedLocation ShortType = "countryNamedLocation" ShortTypeDevice ShortType = "device" ShortTypeDirectoryRole ShortType = "directoryRole" ShortTypeDirectoryRoleTemplate ShortType = "directoryRoleTemplate" ShortTypeDomain ShortType = "domain" ShortTypeEmailAuthenticationMethod ShortType = "emailAuthenticationMethod" ShortTypeExternalSponsors ShortType = "externalSponsors" ShortTypeFido2AuthenticationMethod ShortType = "fido2AuthenticationMethod" ShortTypeGroup ShortType = "group" ShortTypeGroupMembers ShortType = "groupMembers" ShortTypeIpNamedLocation ShortType = "ipNamedLocation" ShortTypeInternalSponsors ShortType = "internalSponsors" ShortTypeNamedLocation ShortType = "namedLocation" ShortTypeMicrosoftAuthenticatorAuthenticationMethod ShortType = "microsoftAuthenticatorAuthenticationMethod" ShortTypeOrganization ShortType = "organization" ShortTypePasswordAuthenticationMethod ShortType = "passwordAuthenticationMethod" ShortTypePhoneAuthenticationMethod ShortType = "phoneAuthenticationMethod" ShortTypeRequestorManager ShortType = "requestorManager" ShortTypeServicePrincipal ShortType = "servicePrincipal" ShortTypeSingleUser ShortType = "singleUser" ShortTypeSocialIdentityProvider ShortType = "socialIdentityProvider" ShortTypeTemporaryAccessPassAuthenticationMethod ShortType = "temporaryAccessPassAuthenticationMethod" ShortTypeUser ShortType = "user" ShortTypeWindowsHelloForBusinessAuthenticationMethod ShortType = "windowsHelloForBusinessAuthenticationMethod" )
type Type ¶ added in v0.24.0
type Type = string
const ( TypeAccessPackage Type = "#microsoft.graph.accessPackage" TypeAccessPackageAssignmentPolicy Type = "#microsoft.graph.accessPackageAssignmentPolicy" TypeAccessPackageQuestion Type = "#microsoft.graph.accessPackageQuestion" TypeAccessPackageTextInputQuestion Type = "#microsoft.graph.accessPackageTextInputQuestion" TypeAccessPackageMultipleChoiceQuestion Type = "#microsoft.graph.accessPackageMultipleChoiceQuestion" TypeAccessPackageCatalog Type = "#microsoft.graph.accessPackageCatalog" TypeAccessPackageResourceRequest Type = "#microsoft.graph.accessPackageResourceRequest" TypeAdministrativeUnit Type = "#microsoft.graph.administrativeUnit" TypeApplication Type = "#microsoft.graph.application" TypeConditionalAccessPolicy Type = "#microsoft.graph.conditionalAccessPolicy" TypeConnectedOrganizationMembers Type = "#microsoft.graph.connectedOrganizationMembers" TypeConnectionInfo Type = "#microsoft.graph.connectionInfo" TypeCountryNamedLocation Type = "#microsoft.graph.countryNamedLocation" TypeDevice Type = "#microsoft.graph.device" TypeDirectoryRole Type = "#microsoft.graph.directoryRole" TypeDirectoryRoleTemplate Type = "#microsoft.graph.directoryRoleTemplate" TypeDomain Type = "#microsoft.graph.domain" TypeEmailAuthenticationMethod Type = "#microsoft.graph.emailAuthenticationMethod" TypeExternalSponsors Type = "#microsoft.graph.externalSponsors" TypeFido2AuthenticationMethod Type = "#microsoft.graph.fido2AuthenticationMethod" TypeGroup Type = "#microsoft.graph.group" TypeGroupMembers Type = "#microsoft.graph.groupMembers" TypeIpNamedLocation Type = "#microsoft.graph.ipNamedLocation" TypeInternalSponsors Type = "#microsoft.graph.internalSponsors" TypeNamedLocation Type = "#microsoft.graph.namedLocation" TypeMicrosoftAuthenticatorAuthenticationMethod Type = "#microsoft.graph.microsoftAuthenticatorAuthenticationMethod" TypeOrganization Type = "#microsoft.graph.organization" TypePasswordAuthenticationMethod Type = "#microsoft.graph.passwordAuthenticationMethod" TypePhoneAuthenticationMethod Type = "#microsoft.graph.phoneAuthenticationMethod" TypeRequestorManager Type = "#microsoft.graph.requestorManager" TypeServicePrincipal Type = "#microsoft.graph.servicePrincipal" TypeSingleUser Type = "#microsoft.graph.singleUser" TypeSocialIdentityProvider Type = "#microsoft.graph.socialIdentityProvider" TypeTemporaryAccessPassAuthenticationMethod Type = "#microsoft.graph.temporaryAccessPassAuthenticationMethod" TypeUser Type = "#microsoft.graph.user" TypeWindowsHelloForBusinessAuthenticationMethod Type = "#microsoft.graph.windowsHelloForBusinessAuthenticationMethod" )
Click to show internal directories.
Click to hide internal directories.