Edits history of script submission #23343 for ' List Categories (outlook)'

  • bunnative
    One script reply has been approved by the moderators
    Ap­pro­ved
    //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

  • bunnative
    //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