1、需求
定期同步企業微信的用戶信息到 LDAP 中,當有新用戶時,會自動發送LDAP的賬號密碼給該用戶郵箱。
2、環境
python 3.x
需要安裝兩個模塊
pip install ldap3 requests
3、代碼文件
代碼托管於 Github
參考:https://github.com/huangchaosysu/optools/tree/master/sync_wxwork_2_ad
ldap3語法:https://ldap3.readthedocs.io/searches.html
企業微信API:https://work.weixin.qq.com/api/doc#90001/90135/90196