https://github.com/davido/gerrit-oauth-provider/wiki/Getting-Started#office365
remember change redirect URL to ${canonicalWebUrl}/oauth
download plugin binary file here:
https://github.com/davido/gerrit-oauth-provider/releases
config as below
gerrit.config:
12 [auth]
13 >---type = OAUTH
14 >---gitBasicAuthPolicy = HTTP
...
29 [plugin "gerrit-oauth-provider-office365-oauth"]
30 >---client-id = xxxx
secure.config
3 [plugin "gerrit-oauth-provider-office365-oauth"]
4 >---client-secret = xxxx