async def _get_user_drive(self, client: httpx.AsyncClient) -> Optional[Dict]:
        """Get the user's default OneDrive with fallback handling.

        Tries multiple approaches based on available permissions.
        """
        # First try to get the default drive
        try:
            url = "https://graph.microsoft.com/v1.0/me/drive"
            return await self._get_with_auth(client, url)
        except httpx.HTTPStatusError as e:
            if e.response.status_code == 400:
                error_body = e.response.json() if hasattr(e.response, "json") else {}
                if "SPO license" in str(error_body):
                    logger.warning("Tenant does not have SPO license, trying alternative endpoints")
                    # Try to get drives list instead
                    drives = await self._get_available_drives(client)
                    if drives:
                        logger.info(f"Found {len(drives)} drives via /me/drives")
                        return drives[0]  # Return first available drive
                    else:
                        logger.info("No drives found, will create virtual app folder drive")
                        return None
            raise
Get the user's default OneDrive with fallback handling.

        Tries multiple approaches based on available permissions.
        
backend/airweave/platform/sources/onedrive.py