iisnode encountered an error when processing the request.

HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error

You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.

The last 64k of the output generated by the node.exe process to stderr is shown below:

Error getting the secret: invalid_client: 7000222 - [2026-07-26 20:43:06Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 1e611a6a-0e18-47b7-8ebc-a204e4e62200 Correlation ID: 2fc4c02f-1c3f-45a4-abec-c4db7aa8e3e2 Timestamp: 2026-07-26 20:43:06Z - Correlation ID: 2fc4c02f-1c3f-45a4-abec-c4db7aa8e3e2 - Trace ID: 1e611a6a-0e18-47b7-8ebc-a204e4e62200
(node:2432) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Error getting the secret: invalid_client: 7000222 - [2026-07-26 20:43:07Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 1e611a6a-0e18-47b7-8ebc-a204e7e62200 Correlation ID: 70eb1aa3-edda-47f8-a4c6-ff0b6c78eab8 Timestamp: 2026-07-26 20:43:07Z - Correlation ID: 70eb1aa3-edda-47f8-a4c6-ff0b6c78eab8 - Trace ID: 1e611a6a-0e18-47b7-8ebc-a204e7e62200
Error getting the secret: invalid_client: 7000222 - [2026-07-26 20:43:07Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 046891b8-b1fd-4617-8d90-8189e64b1e00 Correlation ID: 51d772c4-347e-49e4-823d-40e3c2f9643a Timestamp: 2026-07-26 20:43:07Z - Correlation ID: 51d772c4-347e-49e4-823d-40e3c2f9643a - Trace ID: 046891b8-b1fd-4617-8d90-8189e64b1e00
Error getting the secret: invalid_client: 7000222 - [2026-07-26 20:43:07Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 046891b8-b1fd-4617-8d90-8189ed4b1e00 Correlation ID: 7abb46ba-9c68-479e-84d7-8192a7e71200 Timestamp: 2026-07-26 20:43:07Z - Correlation ID: 7abb46ba-9c68-479e-84d7-8192a7e71200 - Trace ID: 046891b8-b1fd-4617-8d90-8189ed4b1e00
Error getting the secret: invalid_client: 7000222 - [2026-07-26 20:43:07Z]: AADSTS7000222: The provided client secret keys for app '1a3f705e-321b-477c-a2a9-dd6e240f8c1e' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 59202e8f-c9fb-41b3-a7c2-b68c85363200 Correlation ID: a9e62879-8c9e-489e-a0b2-9aa0693ae87a Timestamp: 2026-07-26 20:43:07Z - Correlation ID: a9e62879-8c9e-489e-a0b2-9aa0693ae87a - Trace ID: 59202e8f-c9fb-41b3-a7c2-b68c85363200
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read properties of undefined (reading 'username')
    at C:\vehicle_status_API\server.js:30:32
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)