You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cost-management-billing/costs/export-cost-data-storage-account-sas-key.md
+50-7Lines changed: 50 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Export cost data with an Azure Storage account SAS key
3
3
description: This article helps partners create a SAS key and configure Cost Management exports.
4
4
author: bandersmsft
5
5
ms.author: banders
6
-
ms.date: 06/07/2023
6
+
ms.date: 11/29/2023
7
7
ms.topic: how-to
8
8
ms.service: cost-management-billing
9
9
ms.subservice: cost-management
@@ -14,11 +14,12 @@ ms.reviewer: adwise
14
14
15
15
The following information applies to Microsoft partners only.
16
16
17
-
Often, partners don't have their own Azure subscriptions in the tenant that's associated with their own Microsoft Partner Agreement. Partners with a Microsoft Partner Agreement plan who are global admins of their billing account can export and copy cost data into a storage account in a different tenant using a shared access service (SAS) key. In other words, a storage account with a SAS key allows the partner to use a storage account that's outside of their partner agreement to receive exported information. This article helps partners create a SAS key and configure Cost Management exports.
17
+
Often, partners don't have their own Azure subscriptions in the tenant associated with their own Microsoft Partner Agreement. Partners with a Microsoft Partner Agreement plan who are global admins of their billing account can export and copy cost data into a storage account in a different tenant using a shared access service (SAS) key. In other words, a storage account with a SAS key allows the partner to use a storage account that's outside of their partner agreement to receive exported information. This article helps partners create a SAS key and configure Cost Management exports.
18
18
19
19
## Requirements
20
20
21
-
- You must be a partner with a Microsoft Partner Agreement and have customers on the Azure Plan.
21
+
- You need must be a partner with a Microsoft Partner Agreement. Your customers on the Azure plan must have Microsoft Customer Agreement that is signed.
22
+
- SAS key-based export isn't supported for indirect enterprise agreements.
22
23
- You must be global admin for your partner organization's billing account.
23
24
- You must have access to configure a storage account that's in a different tenant of your partner organization. You're responsible for maintaining permissions and data access when your export data to your storage account.
24
25
- The storage account must not have a firewall configured.
@@ -40,7 +41,7 @@ Get a storage account SAS token or create one using the Azure portal. To create
40
41
1. Choose expiration and dates. Make sure to update your export SAS token before it expires. The longer the time period you configure before expiration, the longer your export runs before needing a new SAS token.
41
42
1. Select **HTTPS only** for _Allowed protocols_.
42
43
1. Select **Basic** for _Preferred routing tier_.
43
-
1. Select **key1** for _Signing key_. If you rotate or update the key that's used to sign the SAS token, you'll need to regenerate a new SAS token for your export.
44
+
1. Select **key1** for _Signing key_. If you rotate or update the key used to sign the SAS token, you must regenerate a new SAS token.
44
45
1. Select **Generate SAS and connection string**.
45
46
The **SAS token** value shown is the token that you need when you configure exports.
46
47
@@ -49,14 +50,14 @@ Get a storage account SAS token or create one using the Azure portal. To create
49
50
Navigate to **Exports** at the billing account scope and create a new export using the following steps.
50
51
51
52
1. Select **Create**.
52
-
1. Configure the Export details as you would for a normal export. You can configure the export to use an existing directory or container or you can specify a new directory or container and exports will create them for you.
53
+
1. Configure the Export details as you would for a normal export. You can configure the export to use an existing directory or container or you can specify a new directory or container. The export process creates them for you.
53
54
1. When configuring Storage, select **Use a SAS token**.
54
55
:::image type="content" source="./media/export-cost-data-storage-account-sas-key/new-export.png" alt-text="Screenshot showing the New export where you select SAS token." lightbox="./media/export-cost-data-storage-account-sas-key/new-export.png" :::
55
56
1. Enter the name of the storage account and paste in your SAS token.
56
57
1. Specify an existing container or Directory or identify new ones to be created.
57
58
1. Select **Create**.
58
59
59
-
The SAS token-based export only works while the token remains valid. Reset the token before the current one expires, or your export will stop working. Because the token provides access to your storage account, protect the token as carefully as you would any other sensitive information. You're responsible to maintain permissions and data access when your export data to your storage account.
60
+
The SAS token-based export only works while the token remains valid. Reset the token before the current one expires, or your export stops working. Because the token provides access to your storage account, protect the token as carefully as you would any other sensitive information. You're responsible to maintain permissions and data access when your export data to your storage account.
60
61
61
62
## Troubleshoot exports using SAS tokens
62
63
@@ -75,11 +76,53 @@ The following are common issues that might happen when you configure or use SAS
75
76
- Not seeing the key is expected behavior. After the SAS Export is configured, the key is hidden for security reasons.
76
77
77
78
- You can't access the storage account from the tenant where the export is configured.
78
-
-It's expected behavior. If the storage account is in another tenant, you need to navigate to that tenant first in the Azure portal to find the storage account.
79
+
-The behavior is expected. If the storage account is in another tenant, you need to navigate to that tenant first in the Azure portal to find the storage account.
79
80
80
81
- Your export fails because of a SAS token-related error.
81
82
- Your export works only while the SAS token remains valid. Create a new key and run the export.
82
83
84
+
## SAS token-based exports FAQ
85
+
86
+
Here are some frequently asked questions and answers about SAS token-based exports.
87
+
88
+
### Why do I see garbled characters when I open exported cost files with Microsoft Excel?
89
+
90
+
If you see garbled characters in Excel and you use an Asian-based language, such as Japanese or Chinese, you can resolve this issue with the following steps:
91
+
92
+
For new versions of Excel:
93
+
94
+
1. Open Excel.
95
+
1. Select the **Data** tab at the top.
96
+
1. Select the **From Text/CSV** option.
97
+
:::image type="content" source="./media/export-cost-data-storage-account-sas-key/new-excel-from-text.png" alt-text="Screenshot showing the Excel From Text/CSV option." lightbox="./media/export-cost-data-storage-account-sas-key/new-excel-from-text.png" :::
98
+
1. Select the CSV file that you want to import.
99
+
1. In the next box, set **File origin** to **65001: Unicode (UTF-8)**.
1. Select the **From Text** option and then select the CSV file that you want to import.
108
+
1. Excel shows the Text Import Wizard.
109
+
1. In the wizard, select the **Delimited** option.
110
+
1. In the **File origin** field, select **65001 : Unicode (UTF-8)**.
111
+
1. Select **Next**.
112
+
1. Next, select the **Comma** option and then select **Finish**.
113
+
1. In the dialog window that appears, select **OK**.
114
+
115
+
### Why does the aggregated cost from the exported file differ from the cost displayed in Cost Analysis?
116
+
117
+
You might have discrepancies between the aggregated cost from the exported file and the cost displayed in Cost Analysis. Determine if the tool you use to read and aggregate the total cost is truncating decimal values. This issue can happen in tools like Power BI and Microsoft Excel. Determine if decimal places are getting dropped when cost values are converted into integers. Losing decimal values can result in a loss of precision and misrepresentation of the aggregated cost.
118
+
119
+
To manually transform a column to a decimal number in Power BI, follow these steps:
120
+
121
+
1. Go to the Table view.
122
+
1. Select **Transform data**.
123
+
1. Right-click the required column.
124
+
1. Change the type to a decimal number.
125
+
83
126
## Next steps
84
127
85
128
- For more information about exporting Cost Management data, see [Create and export data](tutorial-export-acm-data.md).
If you need to export to a storage account behind the firewall for security and compliance requirements, ensure that you have all [prerequisites](#prerequisites) met.
252
252
253
-
Enable **Allow trusted Azure services access** on the storage accountfrom the Exports page. Here's a screenshot showing the page.
253
+
Enable **Allow trusted Azure services access** on the storage account. You can turn that on while configuring the firewall of the storage account, from the Networking page. Here's a screenshot showing the page.
:::image type="content" source="./media/tutorial-export-acm-data/allow-trusted-access.png" alt-text="Screenshot showing the Allow Azure services on the trusted services list exception option." lightbox="./media/tutorial-export-acm-data/allow-trusted-access.png" :::
256
+
257
+
If you missed enabling that setting, you can easily do so from the **Exports** page when creating a new export.
A system-assigned managed identity is created for a new job export when it's created or modified. You must have permissions because Cost Management uses the privilege to assign the *StorageBlobDataContributor* role to the managed identity. The permission is restricted to the storage account container scope. After the export job is created or updated, the user doesn't require Owner permissions for regular runtime operations.
0 commit comments