Documentation ¶
Index ¶
Constants ¶
const ( // GraphScope The OAuth2 scope used for dealing with MS Graph API GraphScope string = "https://graph.microsoft.com/.default" )
Variables ¶
This section is empty.
Functions ¶
func AddUsers ¶
AddUsers godoc @BasePath /aadgroup/api/v1 @Summary Add users to group @Schemes @Description Add a list of users to a group @Tags azuread group user @Accept multipart/form-data @Produce json @Param groupMembers formData GroupMembers true "The group members with group ObjectId" @Success 201 {boolean} true @Router /users [post]
func GetBearerToken ¶
GetBearerToken returns a token from Azure AD
func GetHealth ¶
Health check verifies connectivity and login to Microsoft Graph API. GraphClient will kill the main process if it is not working.
func GetUser ¶
GetUser godoc @BasePath /aadgroup/api/v1 @Summary Get user @Schemes @Description Return a single user based on User Principal Name @Tags azuread group user @Accept json @Produce json @Param upn path string true "User Principal Name" @Success 200 {object} employee @Router /user/{upn} [get]
func GetUsers ¶
GetUsers godoc @BasePath /aadgroup/api/v1 @Summary Get list of users from group @Schemes @Description Return all users from a group @Tags azuread group user @Accept json @Produce json @Param groupObjectId path string false "Group ObjectId" @Success 200 {object} employee @Router /users/{groupObjectId} [get]
func RemoveUser ¶
RemoveUser godoc @BasePath /aadgroup/api/v1 @Summary Remove user from group @Schemes @Description Remove a single user from a group @Tags azuread group user @Accept multipart/form-data @Produce json @Param groupMember formData GroupMember true "The group member with group ObjectId" @Success 204 {string} No Content @Router /user [delete]