async def _generate_drive_entity(
        self, client: httpx.AsyncClient
    ) -> AsyncGenerator[OneDriveDriveEntity, None]:
        """Generate OneDriveDriveEntity for the user's drive(s)."""
        drive_obj = await self._get_user_drive(client)

        if not drive_obj:
            # Fallback to app folder if no drive is accessible
            drive_obj = await self._create_app_folder_drive()
            logger.info("Using app folder access mode")

        logger.info(f"Drive: {drive_obj}")

        yield OneDriveDriveEntity(
            entity_id=drive_obj["id"],
            breadcrumbs=[],  # top-level entity
            drive_type=drive_obj.get("driveType"),
            owner=drive_obj.get("owner"),
            quota=drive_obj.get("quota"),
            created_at=drive_obj.get("createdDateTime"),
            updated_at=drive_obj.get("lastModifiedDateTime"),
        )
Generate OneDriveDriveEntity for the user's drive(s).
backend/airweave/platform/sources/onedrive.py