Azure / Azure/azure-libraries-for-java

Documentation on wiki: Authenticate using a service principal

Aperta
#476 1 commento 0 reazioni 1 assegnatario Rivendicata da @jianghaolu Vedi su GitHub
Authentication customer-reported Question
Lingua principale
Java
Stelle
97
Fork
102
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I noticed that the documentation on the wiki may be incorrect. Please tell me if I am wrong.
```java
ApplicationTokenCredentials credentials = new ApplicationTokenCredentials(
"",
"contoso.com",
"",
AzureEnvironment.Azure);
```
The domain name variable, "constoso.com", is really the tenant Id. I tried authenticating several times with the domain name from the Service Principal token. I could never authenticate, and it specified that it was looking for a GUID. Please tell me if I am wrong. As soon as I provided the tenantId, then the code started working correctly. It should be noted that I was trying to authenticate using KeyVaultManager in my deployment pipeline.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.