Outlooks

Outlook Logins

An OutlookLogin is the database representation of one of an Associate's login credentials for Outlook email account.

On the Outlooks page (opens in a new tab), Admin users have the ability to create new OutlookLogins, "decommission" existing ones, and change the Associate tied to an OutlookLogin.

Decommissioning an OutlookLogin means we will remove any existing BlastContacts tied to it, redistributing those among the other OutlookLogins tied to the same Associate. For example, this might be needed if an email address is constantly going to spam, and we want to stop sending emails from that address.

The table is defined like such:

type OutlookLogin struct {
	BaseModel
	Name                   string `json:"name"`
	Email                  string `json:"email" gorm:"unique;not null"`
	MicrosoftID            string
	TokenType              string `json:"token_type" gorm:"not null"`
	Scope                  string `json:"scope" gorm:"not null"`
	AccessToken            string `json:"access_token" gorm:"not null"`
	AccessTokenExpiration  int64  `json:"expires_in" gorm:"not null"`
	RefreshToken           string `json:"refresh_token" gorm:"not null"`
	RefreshTokenExpiration int64  `json:"refresh_token_expiration" gorm:"not null"`
	Decommissioned         bool   `gorm:"not null;default: false"`
 
	AssociateID uint
	Associate   Associate
 
	BlastContacts      []BlastContact
	GraphSubscriptions []GraphSubscription
}