We found the solution. The correct URI is for Billing Account scope is:
https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/$billingAccountId/providers/Microsoft.CostManagement/generateCostDetailsReport?api-version=2023-11-01"
I made a mistake in the URI.
Thanks for your help.