Forum Discussion

rishivarma's avatar
rishivarma
New Member
1 year ago
Solved

Invalid tenant id provided.

 

I’ve been working on accessing Azure Blob Storage using a Service Principal. While testing this setup with a Spark job in Microsoft Fabric, I encountered an issue when passing the required credentials as command-line arguments.

When I hard-code the values within the application, everything works fine. However, when I pass them as command-line arguments, I receive the following error

java.lang.IllegalArgumentException: Invalid tenant id provided. You can locate your tenant id by following the instructions listed here: https://learn.microsoft.com/partner-center/find-ids-and-domain-names at com.azure.identity.implementation.util.ValidationUtil.validateTenantIdCharacterRange(ValidationUtil.java:72)

For reference, I'm passing the arguments in the following order:

 

"container" "accountname" "abfss://[email protected]/profilrtest/profile.json" "tenantid" "clientid" "clientsecret"

These map to the following variables in my code:

storageAccountName: String,
warehousePath: String,
container: String,
tenantId: String,
clientId: String,
clientSecret: String

Any insights on what might be causing the issue when using command-line arguments would be appreciated.

2 Replies

  • v-priyankata's avatar
    v-priyankata
    Community Support

    Hi rishivarma 
    Glad to hear that you have found the solution. Could you please accept your solution as the accepted solution? It will help other members as well.

    Thanks
    Priyanka

  • Never mind removing the double quotes worked.