code: func (c *UsersController) CreateUserAsServiceAccount(ctx *app.CreateUserAsServiceAccountUsersContext) error {
  
  	isSvcAccount, err := isServiceAccount(ctx, serviceNameAuth)
  	if err != nil {
  		log.Error(ctx, map[string]interface{}{
  			"err": err,
  		}, "failed to determine if account is a service account")
  		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(err))
  
  	}
  	if !isSvcAccount {
  		log.Error(ctx, map[string]interface{}{
  			"identity_id": ctx.ID,
  		}, "account used to call create api is not a service account")
  		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(errs.New("a non-service account tried to create a user.")))
  	}
  
  	return c.createUserInDB(ctx)
  }
docs: // CreateUserAsServiceAccount updates a user when requested using a service account token