Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

217
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda