Replies: 1 comment
-
Yeah so when using non-interactive auth flows you will want to use the let result = client
.user("USER_ID")
.mail_folders()
.list_mail_folders()
.send()
.await; You will need to update your application permissions to be able to use the /users endpoints and do any required admin consent. The Microsoft documentation for |
Beta Was this translation helpful? Give feedback.
-
Hi there. I am attempting to automate the retrieval of emails from a Microsoft 365 account using the SDK. I have successfully obtained the access token via the client secret flow with this straightforward code:
However, the problem arises when trying to fetch the email folders; invoking
/me
comes first:This attempt fails with the error
/me request is only valid with delegated authentication flow
, indicating that the access token obtained through the client credential flow, which does not require user interaction, lacks the necessary permissions to call/me
.Is there a way within the SDK to obtain a non-interactive access token that contains sufficient permissions to access a user's email folders?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions