#!/usr/bin/env python
# -*- coding: utf-8 -*-

from m365_user_manager import UserManagementOrchestrator, FormFields
import asyncio

async def main():
    try:
        # Basic setup
        FormFields(webhook_url="Webhook_URL_1737575340806")
        
        
        # Create and initialize orchestrator
        try:
            orchestrator = await UserManagementOrchestrator.create(running_in_asio=False)
        except Exception as e:
            print(f"Failed to create orchestrator: {e}")
            raise
            
        # Run main process
        await orchestrator.run()
        
    except Exception as e:
        print(f"Critical error in main: {e}")
        raise

if __name__ == "__main__":
    asyncio.run(main())
