Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Same ID for two folders with different "displayName"

I made a request to this API and got msgfolderroot ID:

https://graph.microsoft.com/beta/me/mailFolders/msgfolderroot

After that, I made a call and got a list of folders:

https://graph.microsoft.com/beta/me/mailFolders/root/childFolders

I needed to find a msgfolderroot in the root directory, so I copied the ID of the desired folder from the first query and searched in the response of the second request, as the result I found that two folders can have one ID.

Please, tell me, how is this possible? And, please, describe why childFolderCount and totalItemCount of these two folders different?

Examples

Response from first request:

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#users('9ee07cfe-3e76-4005-bd2b-258f31aaea72')/mailFolders/$entity",
    "id": "AAMkAGNjZjYwNmU4LTJjYWUtNDJiNC1hNWNhLWMwNzllZWZkMjM0NAAuAAAAAAAJFA5toPC1R7wN_YNAZc4HAQAYGWCmW3joQLGNsVuMcOgpAAAAAAEIAAA=",
    "displayName": "Корневой уровень хранилища",
    "parentFolderId": "AAMkAGNjZjYwNmU4LTJjYWUtNDJiNC1hNWNhLWMwNzllZWZkMjM0NAAuAAAAAAAJFA5toPC1R7wN_YNAZc4HAQAYGWCmW3joQLGNsVuMcOgpAAAAAAEBAAA=",
    "childFolderCount": 20,
    "unreadItemCount": 0,
    "totalItemCount": 0,
    "wellKnownName": "msgfolderroot"
}

Folders with same IDs in response of the second request:

{
  "id": "AAMkAGNjZjYwNmU4LTJjYWUtNDJiNC1hNWNhLWMwNzllZWZkMjM0NAAuAAAAAAAJFA5toPC1R7wN_YNAZc4HAQAYGWCmW3joQLGNsVuMcOgpAAAAAAEiAAA=",
  "displayName": "XrmActivityStream",
  "parentFolderId": "AAMkAGNjZjYwNmU4LTJjYWUtNDJiNC1hNWNhLWMwNzllZWZkMjM0NAAuAAAAAAAJFA5toPC1R7wN_YNAZc4HAQAYGWCmW3joQLGNsVuMcOgpAAAAAAEBAAA=",
  "childFolderCount": 0,
  "unreadItemCount": 0,
  "totalItemCount": 25,
  "wellKnownName": null
},

...

{
  "id": "AAMkAGNjZjYwNmU4LTJjYWUtNDJiNC1hNWNhLWMwNzllZWZkMjM0NAAuAAAAAAAJFA5toPC1R7wN_YNAZc4HAQAYGWCmW3joQLGNsVuMcOgpAAAAAAEIAAA=",
  "displayName": "Корневой уровень хранилища",
  "parentFolderId": "AAMkAGNjZjYwNmU4LTJjYWUtNDJiNC1hNWNhLWMwNzllZWZkMjM0NAAuAAAAAAAJFA5toPC1R7wN_YNAZc4HAQAYGWCmW3joQLGNsVuMcOgpAAAAAAEBAAA=",
  "childFolderCount": 20,
  "unreadItemCount": 0,
  "totalItemCount": 0,
  "wellKnownName": "msgfolderroot"
}
like image 530
Aleksei Gurzhii Avatar asked Sep 20 '25 01:09

Aleksei Gurzhii


1 Answers

The two IDs are not quite identical. The first ends in iAAA= the second ends in IAAA=.

The reason for childFolderCount and totalItemCount being different is simply because they are different folders and so can have different counts of items and folders within them.

Although this question is several years old, this is one of the first results for those seeking help when they appear to have duplicate mailFolder IDs. It's relatively common for basic string comparison tools to default to being case-insensitive, which would incorrectly identify these folders as identical.

like image 192
Sam Avatar answered Sep 22 '25 22:09

Sam