azure-sdk-for-js: [Text Analytics]It will return error when use textAnalyticsClient with AAD authentication to run integration tests on UsGov cloud and China cloud

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 textAnalyticsClient 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: image

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 text analytics client, the value of scope is here. image

Expected Behavior: Add different scopes for different clouds in Text Analytics 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, @deyaaeldeen, @ramya-rao-a, @meeraharidasa for notification.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (16 by maintainers)

Most upvoted comments

@v-xuto There is still in discussion, we need to design a way to support of sovereign clouds in the library.

.NET TA client library added an audience option to support other clouds in https://github.com/Azure/azure-sdk-for-net/pull/26583. I am planning on doing the same and will try to finish it in this milestone.

@deyaaeldeen Germany is a deprecated cloud that we don’t support for testing.