Hello Mahesh Kurucheti,
Thanks for posting!
I understand that you are trying to call Graph Endpoint API https://graph.microsoft.com/v1.0/me/events.
using Application permission (Client Credentials Flow), but you are getting below error:
"/me request is only valid with delegated authentication flow".
Delegated permissions are used by those application which require user interaction or signed in by user whereas application permissions do not require any user interaction and used by those applications which run in the background and consented by admin only beforehand.
If you are using the application permissions model (client credentials), you are running your code without any user context, so there is no user to "resolve" for the "/me" endpoint. I would suggest you use /users/{id | userPrincipalName}/events
instead of /me/events
to implement client credentials authentication for Graph API.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.