Description
openedon Apr 29, 2024
We are running live Tests against other clouds like US Gov and Azure China Cloud. The goal is to check whether new azure sdk package work with other clouds or not.
Error Description:
When we use documentAnalysisClient with azure active directory credential to run integration tests on UsGov cloud and China cloud, it will return an error. The error message is shown as following, for more details please check here:
Error Track:
The failed reason is that when we use azure active directory credential, the scope of credential is just supported on Public cloud. The scope of credential defines the set of permissions being requested by the application. In form recognizer client, the process code is here.
the value of scope is here.
Expected Behavior:
Add different scopes for different clouds in Form Recognizer SDK.
The value of the scope in different clouds is follow:
Public cloud: https://cognitiveservices.azure.com/.default
UsGov cloud: https://cognitiveservices.azure.us/.default
China cloud: https://cognitiveservices.azure.cn/.default
@benbp, @meeraharidasa, @jeremymeng for notification.