Skip to content

Commit 0e10ac1

Browse files
authored
Update create-key-vault-for-code-signing.md
1 parent d7b1fb9 commit 0e10ac1

File tree

1 file changed

+20
-180
lines changed

1 file changed

+20
-180
lines changed

powerapps-docs/maker/common/wrap/create-key-vault-for-code-signing.md

Lines changed: 20 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ contributors:
1414
- mkaur-msft
1515
---
1616
# Create Azure key valut for wrap for Power Apps
17-
You need to have [Azure Key Vault](/azure/key-vault/general/basic-concepts) set up to automatically sign your Android or iOS mobile app package in **Step 2** of wrap wizard. Azure key vault is a cloud service that provides a secure store for secrets. You can securely store keys, passwords, certificates, and other secrets. More information: [Intoduction to Azure key vault](/azure/key-vault/general/overview).
17+
You need to have [Azure Key Vault](/azure/key-vault/general/basic-concepts) set up to automatically sign your Android or iOS mobile app package in [Step 2](wrap-how-to.mdstep-2-target-platform) of wrap wizard. Azure key vault is a cloud service that provides a secure store for secrets. You can securely store keys, passwords, certificates, and other secrets. More information: [Intoduction to Azure key vault](/azure/key-vault/general/overview).
1818

1919
You can use an exsiting Azure key vault or create a new one one [Azure portal](https://portal.azure.com) using the instructions below.
2020

21-
**Prerequisites**
21+
## Prerequisites
2222

2323
- Azure Active Directory subscription to [create Key Vault](/azure/key-vault/general/quick-create-portal).
2424
- Admin access for your tenant.
@@ -33,33 +33,34 @@ Follow these steps to create **Azure key vault** for wrap for Power Apps and con
3333

3434
2. In your default subscription's **Access Control (IAM)**, add a **Reader** role assignment to the **Service Principal** representing your app, e.g. **Wrap KeyVault Access App**. Make sure it is present in the **Subscription's IAM**, and the **Keyvault's IAM**.
3535

36-
Go to **Access control (IAM)** tab and select **Add role assignment** option under **Add** menu button.
36+
1. Go to **Access control (IAM)** tab and select **Add role assignment** option under **Add** menu button.
3737

38-
> [!div class="mx-imgBorder"]
39-
> ![Add role assignment on Access control tab.](media/how-to-v2/Access_control_tab.png "Add role assignment on Access control tab.")
38+
> [!div class="mx-imgBorder"]
39+
> ![Add role assignment on Access control tab.](media/how-to-v2/Access_control_tab.png "Add role assignment on Access control tab.")
4040
41-
Select **Job fucntion roles** tab and make sure **Reader** role is selcetdd. Then click on **Members** tab in the top menu.
41+
2. Select **Job fucntion roles** tab and make sure **Reader** role is selcetdd. Then click on **Members** tab in the top menu.
4242

43-
> [!div class="mx-imgBorder"]
44-
> ![Select the Members tab.](media/how-to-v2/Add_members.png "Selet the Members tab.")
43+
> [!div class="mx-imgBorder"]
44+
![Select the Members tab.](media/how-to-v2/Add_members.png "Selet the Members tab.")
4545

46-
Search for **Wrap KeyVault Access App** on **Members** tab.
46+
3. Search for **Wrap KeyVault Access App** on **Members** tab.
4747

48-
> [!div class="mx-imgBorder"]
49-
> ![Search for Wrap KeyVault Access App.](media/how-to-v2/Add_role_assignment.png "Search for Wrap KeyVault Access App.")
48+
> [!div class="mx-imgBorder"]
49+
> ![Search for Wrap KeyVault Access App.](media/how-to-v2/Add_role_assignment.png "Search for Wrap KeyVault Access App.")
5050
51-
Select **Wrap KeyVault Access App** and click on **Review + assign** button on the bottom of the tab to assign **Reader** role to it.
51+
4. Select **Wrap KeyVault Access App** and click on **Review + assign** button on the bottom of the tab to assign **Reader** role to it.
5252

53-
> [!div class="mx-imgBorder"]
54-
> ![Assign Reader role to Wrap KeyVault Access App.](media/how-to-v2/Add_role_for_wrap_signing.png "Assign Reader role to Wrap KeyVault Access App.")
55-
56-
4. Create or access existing key vault. Please ensure this key vault is located in the default subscription for your tenant. More information: [Create a key vault using the Azure portal](/azure/key-vault/general/quick-create-portal).
53+
> [!div class="mx-imgBorder"]
54+
> ![Assign Reader role to Wrap KeyVault Access App.](media/how-to-v2/Add_role_for_wrap_signing.png "Assign Reader role to Wrap KeyVault Access App.")
55+
56+
57+
3. Create or access existing key vault. Please ensure this key vault is located in the default subscription for your tenant. More information: [Create a key vault using the Azure portal](/azure/key-vault/general/quick-create-portal).
5758

58-
5. Add access policies for the key vault.
59+
4. Add access policies for the key vault.
5960

6061
:::image type="content" source="media/wrap-canvas-app/wrap-keyvault.gif" alt-text="Add access policies for the key vault.":::
6162

62-
6. Follow one of the these options, depending on your device:
63+
5. Follow one of the these options, depending on your device:
6364
- For Android, create the .pfx file upload it to the keyvault certificate section. More information: [Generate keys](code-sign-android.md#generate-keys)
6465

6566
:::image type="content" source="media/wrap-canvas-app/wrap-1.png" alt-text="Create a cert for Android.":::
@@ -78,172 +79,11 @@ Follow these steps to create **Azure key vault** for wrap for Power Apps and con
7879

7980
:::image type="content" source="media/wrap-canvas-app/wrap-2.png" alt-text="Create a cert for iOS.":::
8081

81-
7. Once iOS or Android certificates are created and uploaded, add three tags with the name as the bundle id, and the value corresponding to the name of the uploaded certificate(s).
82+
6. Once iOS or Android certificates are created and uploaded, add three tags with the name as the bundle id, and the value corresponding to the name of the uploaded certificate(s).
8283

8384
:::image type="content" source="media/wrap-canvas-app/wrap-3.png" alt-text="Add tags.":::
8485

85-
## Troubleshoot Azure key valut for wrap for Power Apps
86-
The following Azure key vault errors might appear in wrap for Power Apps and can be rectified.
87-
88-
#### 1000118
89-
90-
| Error code | Description |
91-
| ------------- |:-------------:|
92-
|1000118 | Default subscription not found, or missing access permissions|
93-
94-
- Make sure your Azure key vault is in the Default Subscription for your tenant.
95-
96-
- Run these PowerShell commands as an admin:
97-
98-
`Connect-AzureAD -TenantId <your tenant ID>` in Power Shell <br>
99-
`New-AzureADServicePrincipal -AppId 4e1f8dc5-5a42-45ce-a096-700fa485ba20 -DisplayName "Wrap KeyVault Access App"`
100-
101-
- In your Default subscription's **Access Control (IAM)** on Azure portal at [https://portal.azure.com](https://portal.azure.com), add a **Reader** role assignment to the **Service Principal** representing your app, e.g. **Wrap KeyVault Access App**. Make sure it is present in both **Subscription's IAM**, and the **Keyvault's IAM**.
102-
103-
Go to **Access control (IAM)** tab and select **Add role assignment** option under **Add** menu button.
104-
105-
> [!div class="mx-imgBorder"]
106-
> ![Add role assignment on Access control tab.](media/how-to-v2/Access_control_tab.png "Add role assignment on Access control tab.")
107-
108-
Select **Job fucntion roles** tab and make sure **Reader** role is selcetdd. Then click on **Members** tab in the top menu.
109-
110-
> [!div class="mx-imgBorder"]
111-
> ![Click on Members tab.](media/how-to-v2/Add_members.png "Click on Members tab.")
112-
113-
Search for **Wrap KeyVault Access App** on **Members** tab.
114-
115-
> [!div class="mx-imgBorder"]
116-
> ![Search for Wrap KeyVault Access App.](media/how-to-v2/Add_role_assignment.png "Search for Wrap KeyVault Access App.")
117-
118-
Select **Wrap KeyVault Access App** and click on **Review + assign** button on the bottom of the tab to assign **Reader** role to it.
119-
120-
> [!div class="mx-imgBorder"]
121-
> ![Assign Reader role to Wrap KeyVault Access App.](media/how-to-v2/Add_role_for_wrap_signing.png "Assign Reader role to Wrap KeyVault Access App.")
122-
123-
124-
### Error code 1000119
125-
126-
| Error code | Description |
127-
| ------------- |:-------------:|
128-
|1000119 | Keyvault does not exist, or Keyvault is missing access privileges|
129-
130-
- Verify that your Azure key vault is in the Default Subscription for your tenant.
131-
132-
- Make sure to to select **Vault access policy** option when creating your key vault.
133-
> [!div class="mx-imgBorder"]
134-
> ![Select Vault Access policy.](media/how-to-v2/VaultAccessPolicy.png "Select Vault access policy option.")
135-
136-
- Run these PowerShell commands as an admin:
137-
138-
`Connect-AzureAD -TenantId <your tenant ID>` in Power Shell <br>
139-
`New-AzureADServicePrincipal -AppId 4e1f8dc5-5a42-45ce-a096-700fa485ba20 -DisplayName "Wrap KeyVault Access App"`
140-
141-
- In your Default subscription's **Access Control (IAM)** on Azure portal at [https://portal.azure.com](https://portal.azure.com), add a **Reader** role assignment to the **Service Principal** representing your app, e.g. **Wrap KeyVault Access App**. Make sure it is present in both **Subscription's IAM**, and the **Keyvault's IAM**.
142-
143-
Go to **Access control (IAM)** tab and select **Add role assignment** option under **Add** menu button.
144-
145-
> [!div class="mx-imgBorder"]
146-
> ![Add role assignment on Access control tab.](media/how-to-v2/Access_control_tab.png "Add role assignment on Access control tab.")
147-
148-
Select **Job fucntion roles** tab and make sure **Reader** role is selcetdd. Then click on **Members** tab in the top menu.
149-
150-
> [!div class="mx-imgBorder"]
151-
> ![Click on Members tab.](media/how-to-v2/Add_members.png "Click on Members tab.")
15286

153-
Search for **Wrap KeyVault Access App** on **Members** tab.
154-
155-
> [!div class="mx-imgBorder"]
156-
> ![Search for Wrap KeyVault Access App.](media/how-to-v2/Add_role_assignment.png "Search for Wrap KeyVault Access App.")
157-
158-
Select **Wrap KeyVault Access App** and click on **Review + assign** button on the bottom of the tab to assign **Reader** role to it.
159-
160-
> [!div class="mx-imgBorder"]
161-
> ![Assign Reader role to Wrap KeyVault Access App.](media/how-to-v2/Add_role_for_wrap_signing.png "Assign Reader role to Wrap KeyVault Access App.")
162-
163-
- Add access policies for your Azure key vault.
164-
> [!div class="mx-imgBorder"]
165-
> ![Add Vault Access policies.](media/how-to-v2/CreateVaultAccessPolicy.png "Add Vault access policies.")
166-
167-
168-
> [!div class="mx-imgBorder"]
169-
> ![Review and Create Vault access policy.](media/how-to-v2/ReviewandCreateVaultPolicy.png "Review and Create Vault Access policy.")
170-
171-
### Error code 1000120
172-
173-
| Error code | Description |
174-
| ------------- |:-------------:|
175-
|1000120 | No organization ID tags found on key vault|
176-
177-
- Go to [Power Platform admin center](https://admin.powerplatform.microsoft.com/environments) and click on the **Environment** where your wrap project is.
178-
> [!div class="mx-imgBorder"]
179-
> ![Select environment.](media/how-to-v2/SelectEnvironment.png "Select environment.")
180-
181-
182-
- Copy the **Organization ID**.
183-
> [!div class="mx-imgBorder"]
184-
> ![Copy Organization ID.](media/how-to-v2/CopyOrganizationID.png "Copy Organization ID.")
185-
186-
187-
- In your keyvault at [Azure portal](https://portal.azure.com), go to **Tags** and add a new tag named **organization-id** and add your **Organization ID** from previous step as a value for this tag.
188-
> [!div class="mx-imgBorder"]
189-
> ![Add tag.](media/how-to-v2/AddTag.png "Add tag.")
190-
191-
### Error code 1000121
192-
193-
| Error code | Description |
194-
| ------------- |:-------------:|
195-
|1000121 | Android keystore is not valid. Missing Tag and/or Certificate|
196-
197-
- Import your **Android Certificate**.
198-
199-
> [!div class="mx-imgBorder"]
200-
> ![Import certificate.](media/how-to-v2/ImportCertificate.png "Import certificate")
201-
202-
> [!div class="mx-imgBorder"]
203-
> ![Create an Android certificate.](media/how-to-v2/CertificateName.png "Create an Android certificate")
204-
205-
206-
- Add a new **Tag** for your **Android Certificate**.
207-
1. The **Tag name** should be based on the **bundle id** that you used in your **wrap project**. For example, if the **bundle id** for your wrapped app is **com.testApp.wrap**, then the new **Tag name** should be **com.testApp.wrap.keystore**.
208-
2. The **Tag value** should correspod to the name you chose for your **Certificate** when uploading a certificate file in the previous step. For example, if your **Cerfificate** is named **AndroidWrapCertificate**, then the value for the **Tag value** should also be **AndroidWrapCertificate**.
209-
210-
> [!div class="mx-imgBorder"]
211-
> ![Create a certificate tag.](media/how-to-v2/CertificateTag.png "Create a certificate tag")
212-
213-
214-
### Error code 1000122
215-
216-
| Error code | Description |
217-
| ------------- |:-------------:|
218-
|1000122 | iOS certificate is not valid|
219-
220-
- Import your **iOS Certificate**.
221-
> [!div class="mx-imgBorder"]
222-
> ![Import certificate.](media/how-to-v2/ImportCertificate.png "Import certificate")
223-
224-
> [!div class="mx-imgBorder"]
225-
> ![Create an iOS certificate.](media/how-to-v2/CertificateNameiOS.png "Create an iOS certificate")
226-
227-
- Add a new **Tag** for your **iOS Certificate**.
228-
1. The **Tag name** should be based on the **bundle id** that you used in your **wrap project**. For example, if the **bundle id** for your wrapped app is **com.testApp.wrap**, then the new **Tag name** should be **com.testApp.wrap.cert**.
229-
2. The **Tag value** should correspod to the name you chose for your **Certificate** when uploading a certificate file in the previous step. For example, if your **Cerfificate** is named **iOSCertificate1**, then the value for the **Tag value** should also be **iOSCertificate1**.
230-
231-
> [!div class="mx-imgBorder"]
232-
> ![Create a certificate tag for iOS.](media/how-to-v2/CertificateTagiOS.png "Create a certificate tag for iOS")
233-
234-
### Error code 1000123
235-
236-
| Error code | Description |
237-
| ------------- |:-------------:|
238-
|1000123 | iOS profile is not valid|
239-
240-
- Import your **Provisioning Profile** as a **Secret**
241-
- Add a new **Tag** for your **Provisioning Profile**.
242-
- 1. The **Tag name** should be based on the **bundle id** that you used in your **wrap project**. For example, if the **bundle id** for your wrapped app is **com.testApp.wrap**, then the new **Tag name** should be **com.testApp.wrap.profile**.
243-
2. The **Tag value** should correspod to the name you chose for your **Secret** when uploading a povisioning profile in the previous step. For example, if your **Secret** is named **iOSProvisioningProfileSecret**, then the value for the **Tag value** should also be **iOSProvisioningProfileSecret**.
244-
245-
> [!div class="mx-imgBorder"]
246-
> ![Create a tag for iOS Provisioning Profile Secret.](media/how-to-v2/ProvisioningProfileSecretTag.png "Create a tag for iOS Provisioning Profile Secret")
24787

24888

24989
### See also

0 commit comments

Comments
 (0)