Hi @Jack Le
In your case, tenantId should be like
The code should be like following
AuthenticationManager authManager = new AuthenticationManager(clientId, certPath,certPassword,"xxx.onmicrosoft.com");
If you entered the tenant ID in overview page, the code will return 401 Unauthorized too
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.