Azure / Azure/azure-libraries-for-java

Documentation on wiki: Authenticate using a service principal

Offen
#476 1 Kommentar 0 Reaktionen 1 zugewiesene Person Beansprucht von @jianghaolu Auf GitHub ansehen
Authentication customer-reported Question
Vorherrschende Sprache
Java
Sterne
97
Forks
102
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.