//native
/**
* List Categories
* List the categories (labels) defined in the connected mailbox, with their colors. Requires MailboxSettings.Read, which is not a connection default: tick it when connecting.
*/
export async function main(auth: RT.Outlook) {
const response = await fetch(
"https://graph.microsoft.com/v1.0/me/outlook/masterCategories",
{
headers: {
Authorization: `Bearer ${auth.token}`,
Accept: "application/json",
},
}
)
if (!response.ok) {
throw new Error(`${response.status} ${await response.text()}`)
}
return await response.json()
}
Submitted by hugo989 6 hours ago
//native
/**
* List Categories
* List the categories (labels) defined in the connected mailbox, with their colors. Requires MailboxSettings.Read on the connection.
*/
export async function main(auth: RT.Outlook) {
const response = await fetch(
"https://graph.microsoft.com/v1.0/me/outlook/masterCategories",
{
headers: {
Authorization: `Bearer ${auth.token}`,
Accept: "application/json",
},
}
)
if (!response.ok) {
throw new Error(`${response.status} ${await response.text()}`)
}
return await response.json()
}
Submitted by hugo989 6 hours ago