Cognitive Services only allows AAD Tokens on endpoints that have custom domains. Right now, if you try to use the TokenCredential client overload against a region endpoint you get this error:
{"error":{"code":"BadRequest","message": "Please provide an authentication key."}}
It would be great if we could improve that error message to indicate that the user is trying to use AAD against a region endpoint and that they should use a custom subdomain instead.
azsdke2e
@ctstone is this something the service can detect and change?
@maririos, it's not something the FR team controls, but I'll try to find the right team to address this.
Thank you!!
@ctstone - Any update on this? Do we know who owns it?
@jongio, Cognitive Services Platform Team has opened an internal issue to track this.
@ctstone do you know if they've set a priority/estimated date for it's resolution?
ping @ctstone
hi @maririos, sorry for the late reply. This change is complete. If it's not rolled out to all regions, it should be soon.
The new response body is:
{
"error": {
"code": "BadRequest",
"message": "Please provide a custom subdomain for token authentication, otherwise API key is required. (Please see https://aka.ms/cogsvc-authenticatewithtoken)"
}
}
Very cool! Thanks @ctstone for getting this done and thanks @maririos for all the follow ups!