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-12 06:29:18Z]: 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: eb2d2b4f-0886-48fb-a85b-3eeb86520900 Correlation ID: 44af254a-cb08-4b90-989c-570daedb4303 Timestamp: 2026-07-12 06:29:18Z - Correlation ID: 44af254a-cb08-4b90-989c-570daedb4303 - Trace ID: eb2d2b4f-0886-48fb-a85b-3eeb86520900
(node:5784) [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-12 06:29:19Z]: 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: 8bce4bc4-b03f-4bd7-8ba2-865e6cb50200 Correlation ID: 431e6dd6-8769-415d-8a48-318e01436a23 Timestamp: 2026-07-12 06:29:19Z - Correlation ID: 431e6dd6-8769-415d-8a48-318e01436a23 - Trace ID: 8bce4bc4-b03f-4bd7-8ba2-865e6cb50200
Error getting the secret: invalid_client: 7000222 - [2026-07-12 06:29:19Z]: 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: 0e8f923b-c0b3-40af-bf38-d831c3930900 Correlation ID: d6d3f91f-a84d-468b-b97a-0a9b719ab9bf Timestamp: 2026-07-12 06:29:19Z - Correlation ID: d6d3f91f-a84d-468b-b97a-0a9b719ab9bf - Trace ID: 0e8f923b-c0b3-40af-bf38-d831c3930900
Error getting the secret: invalid_client: 7000222 - [2026-07-12 06:29:19Z]: 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: dc450aee-2e2a-41df-8894-b6d90a6e0200 Correlation ID: c0f8b70e-a347-429b-8afb-914862b9588a Timestamp: 2026-07-12 06:29:19Z - Correlation ID: c0f8b70e-a347-429b-8afb-914862b9588a - Trace ID: dc450aee-2e2a-41df-8894-b6d90a6e0200
Error getting the secret: invalid_client: 7000222 - [2026-07-12 06:29:20Z]: 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: f6e330f4-ebd2-4088-ae17-72dc74f90100 Correlation ID: c1b09d89-3d48-442b-853c-3fa8e82e4d1d Timestamp: 2026-07-12 06:29:20Z - Correlation ID: c1b09d89-3d48-442b-853c-3fa8e82e4d1d - Trace ID: f6e330f4-ebd2-4088-ae17-72dc74f90100
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)