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-16 13:24:29Z]: 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: 951ab96d-0e5a-4ba0-8a5d-80cd57e00c00 Correlation ID: fbab3b49-815c-4f3a-b18e-ee249b80a290 Timestamp: 2026-07-16 13:24:29Z - Correlation ID: fbab3b49-815c-4f3a-b18e-ee249b80a290 - Trace ID: 951ab96d-0e5a-4ba0-8a5d-80cd57e00c00
(node:4824) [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-16 13:24:29Z]: 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: e937ca62-d761-4977-aea0-2126ce502b00 Correlation ID: 0e144848-91fc-435f-967a-6befff8aa024 Timestamp: 2026-07-16 13:24:29Z - Correlation ID: 0e144848-91fc-435f-967a-6befff8aa024 - Trace ID: e937ca62-d761-4977-aea0-2126ce502b00
Error getting the secret: invalid_client: 7000222 - [2026-07-16 13:24:29Z]: 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: 44175983-1a8a-4e25-b644-c2578f0e3300 Correlation ID: 09370de7-9e43-4fed-ade7-a598fb6c76c7 Timestamp: 2026-07-16 13:24:29Z - Correlation ID: 09370de7-9e43-4fed-ade7-a598fb6c76c7 - Trace ID: 44175983-1a8a-4e25-b644-c2578f0e3300
Error getting the secret: invalid_client: 7000222 - [2026-07-16 13:24:30Z]: 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: 44175983-1a8a-4e25-b644-c257960e3300 Correlation ID: 3aafae5b-2672-43b0-a691-47af2cb6fde7 Timestamp: 2026-07-16 13:24:30Z - Correlation ID: 3aafae5b-2672-43b0-a691-47af2cb6fde7 - Trace ID: 44175983-1a8a-4e25-b644-c257960e3300
Error getting the secret: invalid_client: 7000222 - [2026-07-16 13:24:30Z]: 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: 475349b7-1a35-41f5-9a46-d931e1a00e00 Correlation ID: 49ada75b-90bf-4806-bfef-7fcb4aed5647 Timestamp: 2026-07-16 13:24:30Z - Correlation ID: 49ada75b-90bf-4806-bfef-7fcb4aed5647 - Trace ID: 475349b7-1a35-41f5-9a46-d931e1a00e00
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)