We understand that you’d like to automatically export usage and cost details for your Microsoft Sponsored subscriptions, but you’re facing challenges because APIs aren’t available for sponsorship offers, and MFA makes it difficult to automate access across multiple subscriptions and users.
Here’s the recommended and secure approach:
- MFA Microsoft Sponsored Subscriptions: Please note that some sponsorship offers may have limited API support. If you find that the export feature is unavailable for your specific subscription, while using a service principal avoids MFA, it is crucial to protect its credentials (especially the client secret) just as you would any other important password. After creating SPN provide RBAC permission on Subscription and Entra. https://learn.microsoft.com/en-us/entra/identity-platform/howto-create-service-principal-portal
- Assign Minimal Permissions
- We’ll give this service principal Cost Management Reader access on each subscription.
- This allows it to read usage and cost data only — it cannot modify resources.
- Set Up Cost Management Exports
- Within each subscription, we’ll configure Cost Management Exports to automatically send detailed cost and usage data (CSV files) to a designated Azure Storage account daily or monthly.
- Once configured, these exports run automatically — no sign-ins or MFA are needed.
- Centralize and Access the Data
- All exported files can be stored in a central storage account for easy access and reporting (for example, using Excel, Power BI, or automation scripts).
- Note on Microsoft Sponsored Subscriptions
- Some sponsorship offers may have limited API support.
- If exports are unavailable, cost data can still be viewed or downloaded directly from the Azure Sponsorship Portal, or Microsoft Support can help enable programmatic access.
Please let me know if you face any challenge here, I can help you to resolve this issue further
Provide your valuable Comments.
Please do not forget to "Accept the answer” and “upvote it” wherever the information provided helps you, this can be beneficial to other community members.it would be greatly appreciated and helpful to others.