Skip to content

🧩 [Domain model]: Inconsistency between IFile and IFolder data models #1873

Description

@BitRevenant

🎯 Describe the domain model extension

The data model IFile exposes the property ListId which is very useful but the data model IFolder doesn't.
I would like the IFolder data model to also expose the same property.

🧱 Model and properties

Model: IFolder
Properties: ListId

πŸ”Œ API type

SharePoint REST

🌐 API endpoint(s)

No response

πŸ€” Additional information

No response

Activity

  1. Adam-it commented on Sep 23, 2026

    @Adam-it
    Member

    @BitRevenant had a quick check on that and is harder than it looks.
    Under the hood we use _api/Web/GetFolderById(guid'...') endpoint which lets you retrieve a folder object by its unique folder GUID.
    However, the folder object itself does not directly contain the List ID and you need to query its ParentList property to get that.

    I think that is one of the reasons the Β Folder.GetLibraryIdFromFolderAsync() method exists. Are you by any chance already using it?

  2. added
    question
    and removed on Sep 23, 2026
  3. BitRevenant commented on Sep 25, 2026

    @BitRevenant
    Author

    Hello @Adam-it, thanks for replying me.
    I tried the method what you wrote in your message called GetLibraryIdFromFolderAsync, however, this does not exist in the interface IFolder. Where can I access it? Thank you.

  4. Adam-it commented on Sep 25, 2026

    @Adam-it
    Member

    @BitRevenant sorry for that, just noticed it is an internal, not exposed as public πŸ€¦β€β™‚οΈπŸ€¦β€β™‚οΈπŸ€¦β€β™‚οΈ.
    In this case there is currently now easy workaround for that 🫀. Will research this more in coming days and bring this up with the rest of the maintainers. Definitely a 'pain' that is worth fixing up

  5. mgwojciech commented on Oct 10, 2026

    @mgwojciech
    Contributor

    Added the work-around. I don't think we would risk anything with that change ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: model πŸ“question

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions