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-04 13:43:47Z]: 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: ee9f0bfe-5634-4a05-a2c3-e08df8ab1800 Correlation ID: e9797f93-bfb4-42eb-96d7-eadda67dcce5 Timestamp: 2026-07-04 13:43:47Z - Correlation ID: e9797f93-bfb4-42eb-96d7-eadda67dcce5 - Trace ID: ee9f0bfe-5634-4a05-a2c3-e08df8ab1800
(node:1608) [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-04 13:43:48Z]: 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: 7137469b-da75-4b93-bde8-765230bf0a00 Correlation ID: fd1fdb03-eca8-4995-9036-d61c8b771ce2 Timestamp: 2026-07-04 13:43:48Z - Correlation ID: fd1fdb03-eca8-4995-9036-d61c8b771ce2 - Trace ID: 7137469b-da75-4b93-bde8-765230bf0a00
Error getting the secret: invalid_client: 7000222 - [2026-07-04 13:43:48Z]: 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: 5cd1e8a5-c8eb-4b9f-a258-ea61e5821800 Correlation ID: 0e25a712-243c-49a9-847d-ec8d6a9dcbe0 Timestamp: 2026-07-04 13:43:48Z - Correlation ID: 0e25a712-243c-49a9-847d-ec8d6a9dcbe0 - Trace ID: 5cd1e8a5-c8eb-4b9f-a258-ea61e5821800
Error getting the secret: invalid_client: 7000222 - [2026-07-04 13:43:48Z]: 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: 7137469b-da75-4b93-bde8-76523fbf0a00 Correlation ID: 25d6c29a-127b-47cc-ae2a-3cf2b518fc6b Timestamp: 2026-07-04 13:43:48Z - Correlation ID: 25d6c29a-127b-47cc-ae2a-3cf2b518fc6b - Trace ID: 7137469b-da75-4b93-bde8-76523fbf0a00
Error getting the secret: invalid_client: 7000222 - [2026-07-04 13:43:48Z]: 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: bc3b44bc-d08b-4156-914e-3b1304ac0d00 Correlation ID: 0d985ab7-869c-4486-91ff-19b05b866176 Timestamp: 2026-07-04 13:43:48Z - Correlation ID: 0d985ab7-869c-4486-91ff-19b05b866176 - Trace ID: bc3b44bc-d08b-4156-914e-3b1304ac0d00
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)