Documentation
¶
Index ¶
- type Client
- type DirectoryRoleResponse
- type DirectoryRolesResponse
- type DirectoryRolesService
- func (s *DirectoryRolesService) ActivateDirectoryRole(ctx context.Context, roleTemplateID string) (*DirectoryRoleResponse, error)
- func (s *DirectoryRolesService) AddMember(ctx context.Context, ...) error
- func (s *DirectoryRolesService) GetDirectoryRole(ctx context.Context, id string) (*DirectoryRoleResponse, error)
- func (s *DirectoryRolesService) ListAll(ctx context.Context) (*DirectoryRolesResponse, error)
- type GroupListOptions
- type GroupResponse
- type GroupsResponse
- type GroupsService
- func (s *GroupsService) CreateGroup(ctx context.Context, r *models.Group) (*GroupResponse, error)
- func (s *GroupsService) DeleteGroup(ctx context.Context, groupID string) error
- func (s *GroupsService) GetGroup(ctx context.Context, groupID string, opts *GroupListOptions) (*GroupResponse, error)
- func (s *GroupsService) ListAll(ctx context.Context, opts *GroupListOptions) (*GroupsResponse, error)
- func (s *GroupsService) UpdateGroup(ctx context.Context, r *models.Group) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
core.BaseClient
//Users *UsersService
Groups *GroupsService
DirectoryRoles *DirectoryRolesService
// contains filtered or unexported fields
}
A Client manages communication with the MS Graph API.
type DirectoryRoleResponse ¶
type DirectoryRoleResponse struct {
models.OData
models.DirectoryRole
}
type DirectoryRolesResponse ¶
type DirectoryRolesResponse struct {
models.OData
DirectoryRoles []*models.DirectoryRole `json:"value"`
}
type DirectoryRolesService ¶
type DirectoryRolesService service
func (*DirectoryRolesService) ActivateDirectoryRole ¶
func (s *DirectoryRolesService) ActivateDirectoryRole(ctx context.Context, roleTemplateID string) (*DirectoryRoleResponse, error)
Activate a directory role. To read a directory role or update its members, it must first be activated in the tenant.
MS Graph API doc: https://docs.microsoft.com/en-us/graph/api/directoryrole-post-directoryroles?view=graph-rest-1.0&tabs=http
func (*DirectoryRolesService) AddMember ¶
func (s *DirectoryRolesService) AddMember(ctx context.Context, objectOrTemplateIDOfDirectoryRole, directoryObjectID string) error
Use this API to create a new directory role member. You can use both the object ID and template ID of the directoryRole with this API. The template ID of a built-in role is immutable and can be seen in the role description on the Azure portal. For details, see Role template IDs.
POST /directoryRoles/{id}/members/$ref
objectOrTemplateIDOfDirectoryRole - the object ID and template ID of the directoryRole directoryObjectID - the directory object ID e.g. user ID, group ID etc.
MS Graph API doc: https://docs.microsoft.com/en-us/graph/api/directoryrole-post-members?view=graph-rest-1.0&tabs=http
func (*DirectoryRolesService) GetDirectoryRole ¶
func (s *DirectoryRolesService) GetDirectoryRole(ctx context.Context, id string) (*DirectoryRoleResponse, error)
Retrieve the properties of a directoryRole object. The role must be activated in tenant for a successful response.
GET /directoryRoles/{id}
MS Graph API doc: https://docs.microsoft.com/en-us/graph/api/directoryrole-get?view=graph-rest-1.0&tabs=http
func (*DirectoryRolesService) ListAll ¶
func (s *DirectoryRolesService) ListAll(ctx context.Context) (*DirectoryRolesResponse, error)
List the directory roles that are activated in the tenant.
MS Graph API doc: https://docs.microsoft.com/en-us/graph/api/directoryrole-list?view=graph-rest-1.0&tabs=http
type GroupListOptions ¶
type GroupsResponse ¶
type GroupsService ¶
type GroupsService service
func (*GroupsService) CreateGroup ¶
func (s *GroupsService) CreateGroup(ctx context.Context, r *models.Group) (*GroupResponse, error)
Create a new group as specified in the request body. You can create the following types of groups:
Microsoft 365 group (unified group) Security group MS Graph API doc: https://docs.microsoft.com/en-us/graph/api/group-post-groups?view=graph-rest-1.0&tabs=http
func (*GroupsService) DeleteGroup ¶
func (s *GroupsService) DeleteGroup(ctx context.Context, groupID string) error
Delete group.
When deleted, Microsoft 365 groups are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. To learn more, see deletedItems. This applies only to Microsoft 365 groups. DELETE /groups/{id}
MS Graph API doc: https://docs.microsoft.com/en-us/graph/api/group-delete?view=graph-rest-1.0&tabs=http
func (*GroupsService) GetGroup ¶
func (s *GroupsService) GetGroup(ctx context.Context, groupID string, opts *GroupListOptions) (*GroupResponse, error)
Get the properties and relationships of a group object.
GET /groups/{id}
MS Graph API doc: https://docs.microsoft.com/en-us/graph/api/group-get?view=graph-rest-1.0&tabs=http
func (*GroupsService) ListAll ¶
func (s *GroupsService) ListAll(ctx context.Context, opts *GroupListOptions) (*GroupsResponse, error)
List all the groups in an organization, including but not limited to Microsoft 365 groups.
MS Graph API doc: https://docs.microsoft.com/en-us/graph/api/group-list?view=graph-rest-1.0&tabs=http
func (*GroupsService) UpdateGroup ¶
Update the properties of a group object.
PATCH /groups/{id}
MS Graph API doc: https://docs.microsoft.com/en-us/graph/api/group-update?view=graph-rest-1.0&tabs=http