Hi @耀駿 施
The /.default
is a static scope that already contains all the permissions you granted in the Azure portal, so you don't need to specify multiple scopes in your code. Please change your code to:
List<String> scopes = new ArrayList<String>();
scopes.add("https://graph.microsoft.com/.default offline_access");
final TokenCredentialAuthProvider tokenCredentialAuthProvider = new TokenCredentialAuthProvider(scopes, clientSecretCredential);
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.