@Murali
Thank you for the detailed post!
From your error message it's stating that your Application is not authorized to perform this operation. Your API permissions show that you're using Delegated permissions for "DeviceManagementManagedDevices.Read.All and DeviceManagementManagedDevices.ReadWrite.All".
There are both Delegated and Application types for these two permissions.
You'll have to add "Application permissions" to your app:
Navigate to your API permissions -> Add a Permission -> Microsoft Graph -> Application Permissions -> Search for the permissions
I hope this helps!
Thank you for your time and patience throughout this issue.
