Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

220
Vistas
How to get office 365 outlook's folders name from a mailbox

I have authenticated for office 365 outlook using passport js

Now I have access token

So I am looking for to get all folders name with their respective folder Id.

I am using node-outlook library but I am not aware what APIs they have provided get only folders path and folder id.

Thanks

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

If you only want to get the folder name and folder Id, you can use the following api call:

$http.get("https://outlook.office.com/api/v2.0/me/MailFolders/$select=Id,ChildFolderCount,DisplayName")

Since the above api, only returns main folders, I strongly suggest that you also select ChildFolderCount and add a check in the response, if ChildFolderCount>0, then get the subfolders of the parent by the following call:

$http.get("https://outlook.office.com/api/v2.0/me/MailFolders/"+parent.Id+"/childfolders?$top="+parent.ChildFolderCount)

where parent is the folder with ChildFolderCount>0.

over 4 years ago · Santiago Trujillo Denunciar

0

The folder resource has a DisplayName property, so that should get what you want. (Reference).

You can also explore the API over at https://oauthplay.azurewebsites.net/. For example, I did a GET on https://outlook.office.com/api/v2.0/me/mailfolders, and this is an example of the result:

{
  "Id": "AQMkAGZjYmY1ZTIwLWI1M2UtNGNkYS05MGQyLTQyMgBjYTliODJhNTIALgAAA6Ii1CwFSf1Ai6F6MypimPkBAGTbcv4AqpNHlH0kubDE5QwAAAIBDwAAAA==",
  "DisplayName": "Drafts",
  "ParentFolderId": "AQMkAGZjYmY1ZTIwLWI1M2UtNGNkYS05MGQyLTQyMgBjYTliODJhNTIALgAAA6Ii1CwFSf1Ai6F6MypimPkBAGTbcv4AqpNHlH0kubDE5QwAAAIBCAAAAA==",
  "ChildFolderCount": 0,
  "UnreadItemCount": 2,
  "TotalItemCount": 9
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda