djouallah opened a new issue, #2326:
URL: https://github.com/apache/iceberg-python/issues/2326

   ### Apache Iceberg version
   
   None
   
   ### Please describe the bug 🐞
   
   using this code
   
   ```
   !pip install --extra-index-url https://test.pypi.org/simple/ 
pyiceberg==0.10.0.dev20250813003016
   
   from pyiceberg.catalog.sql import SqlCatalog
   import duckdb
   def connect_catalog():
         catalog = SqlCatalog(
         "default",
         **{
             "uri": "sqlite:///:memory:",
             "adls.account-name"         : 'onelake' ,
             "adls.client-id"            : client_id,
             "adls.tenant-id"            : tenant_id,
             "adls.client-secret"        : client_secret,
             "legacy-current-snapshot-id": True ,
             "warehouse"                 : 
"abfss://iceb...@onelake.dfs.fabric.microsoft.com/external.Lakehouse/Files"
         },
                           )
         return catalog
   catalog = connect_catalog()
   db = "aemo"
   catalog.create_namespace_if_not_exists(db)
   tbl = db+"."+"calendar"
   if not catalog.table_exists(tbl):
     df=duckdb.sql(""" SELECT cast(unnest(generate_series(cast ('2018-04-01' as 
date), cast('2024-12-31' as date), interval 1 day)) as date) as date,
               EXTRACT(year from date) as year,
               EXTRACT(month from date) as month
               """).arrow()
     catalog.create_table(tbl,schema=df.schema)
     catalog.load_table(tbl).overwrite(df)
     print('calendar created')
   else:
       print("table exist already")
   ```
   
   I am getting this error 
   
   `ClientSecretCredential.get_token_info failed: The current credential is not 
configured to acquire tokens for tenant xxxxxxxxxxxxxxxxxxxxxxxxxx. To enable 
acquiring tokens for this tenant add it to the additionally_allowed_tenants 
when creating the credential, or add "*" to additionally_allowed_tenants to 
allow acquiring tokens for any tenant.`
   
   btw, this works fine and I got a token
   
   ```
   from azure.identity import ClientSecretCredential
   
   # Create credential with specific values
   credential = ClientSecretCredential(
       tenant_id=tenant_id,
       client_id=client_id,
       client_secret=client_secret
   )
   
   # Get token for Azure Storage
   token = credential.get_token("https://storage.azure.com/.default";).token
   ```
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [x] I cannot contribute a fix for this bug at this time


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to