Hi There,
Welcome to Microsoft Q&A Platform. Thank you for the question.
401 Unauthorized error: Is your token valid?
Make sure that your application is presenting a valid access token to Microsoft Graph as part of the request. This error often means that the access token may be missing in the HTTP authenticate request header or that the token is invalid or has expired. We strongly recommend that you use the Microsoft Authentication Library (MSAL) for access token acquisition. Additionally this error may occur, if you try to use a delegated access token granted to a personal Microsoft account, to access an API that only supports work or school accounts (organizational accounts).
Refer Microsoft Documentation
Also, try to test it using any posting tool like postman to confirm if Token is valid.
Regards,
Kamlesh Kumar
Please don't forget to click on
or upvote
button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is How
Want a reminder to come back and check responses? Here is how to subscribe to a Notification
If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators