[BUG]azure-spring-cloud-starter-eventhubs-kafka2.4.0 example china tenant id not working #21336
Labels
azure-spring
All azure-spring related issues
azure-spring-eventhubs
Spring event hubs related issues.
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
good first issue
This issue tracks work that may be a good starting point for a first-time contributor
Milestone
Describe the bug
A clear and concise description of what the bug is.
this issue happened when i run the azure-spring-cloud-starter-eventhubs-kafka example which one in the sdk in china region, the tenant id is working when i run the keyvault example, so i am not sure why not working in the eventhubs kafka side. as i think the different is the keyvault can set the azure.keyvault.authority-host: https://login.partner.microsoftonline.cn and i haven't found any info for this in the AzureEnvironment properities.
kafka example
application yml file parts:
client-id: cccc (this is sp role which has added to the namespace IAM role assignment as Contributor role, has full access)
subscription-id: ccccc
client-secret: ccccc
tenant-id: ccccc
resource-group: cccc
environment: AzureChina
region: China North 2
eventhub:
namespace: cccc
2021-05-12 22:10:07.942 ERROR 36604 --- [onPool-worker-1] c.azure.identity.ClientSecretCredential : Azure Identity => ERROR in getToken() call for scopes [https://management.core.chinacloudapi.cn/.default]: AADSTS90002: Tenant 'xxxxxxxxxxxxxxxxxxx' not found. This may happen if there are no active subscriptions for the tenant. Check to make sure you have the correct tenant ID. Check with your subscription administrator.
Trace ID: vvvvvvv
Correlation ID: vvvvvvvv
Timestamp: 2021-05-12 14:10:08Z
Exception or Stack Trace
Add the exception log and stack trace if available
To Reproduce
Steps to reproduce the behavior:
1、download the full azure sdk(the version i download date is 2021/05/12)
2、update the pom for the sample azure-sdk-masterl\sdk\spring\azure-spring-boot-samples\azure-spring-cloud-sample-eventhubs-kafka, change the 2.5.0-beta.1 to 2.4.0
3、set up the application yml with the related info(what i am ues is a china north 2 region and tenant)
4、mvn clean install -DskipTests
5、mvn spring-boot:run
Code Snippet
Add the code snippet that causes the issue.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
for the event hub namespace( IAM )i have added the service principle role to the list(which clientid and secret is for this sp)
Setup (please complete the following information):
Additional context
Add any other context about the problem here.
i also set up another way to call the event hub base on the SAS policy with kafka protocol, that's work for the event hub and no need to add any dependency.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: