power shell command:
(Invoke-WebRequest https://{OAuth Url}/{your tenant name}/.well-known/openid-configuration|ConvertFrom-Json).token_endpoint.Split('/')[3]
For example:
My tenant name is 'test.partner.onmschina.cn'
OAuth Url is 'login.chinacloudapi.cn'
So the command is
'(Invoke-WebRequest https://login.chinacloudapi.cn/test.partner.onmschina.cn/.well-known/openid-configuration|ConvertFrom-Json).token_endpoint.Split('/')[3]'