APIシステムでデフォルトのアバターを設定し、誰も変更できないようにする方法

The best way will be to this and this and probably the next 3 things you’ll ask is to use DiscourseConnect - Official Single-Sign-On for Discourse (sso) and set discourse connect overrides avatar (there are other overrides for other user fields).