问题
I am posting this as instructed by @AzureSupport on Twitter.
All calls to the Cognitive auth API are returning 500 with a stack trace and this happens for all my subscription keys. This was working correctly and suddenly stopped.
This happens from my application, from curl, and even from the Microsoft test form here.
curl:
curl --header 'Ocp-Apim-Subscription-Key: <my-key>' --data "" 'https://api.cognitive.microsoft.com/sts/v1.0/issueToken'
The pertinent error in the stack trace appears to be:
[AdalServiceException: AADSTS70002: Error validating credentials. AADSTS50012: Client assertion contains an invalid signature. [Reason - The key used is expired., ... redacted ...]
This happens with keys that have been operating correctly for months. It also happens with newly generated keys for testing.
来源:https://stackoverflow.com/questions/41942838/requests-to-issue-auth-token-from-microsoft-cognitive-api-return-500-with-stack