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/20201119-connect-to-sharepoint-apppermission-certificate-keyvault/index.html
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -537,7 +537,7 @@ <h2 id="goal-of-this-article">Goal of this article</h2>
537
537
<p>This article will show how to work with a SharePoint site through an API or a Web Application, only with AAD Application permissions.</p>
538
538
<p>It will demonstrate how to setup everything and how to connect with a certificate stored in a Key Vault, step by step, in UI, PowerShell and Azure CLI.</p>
<p><imgalt="alt text" src="../../images/articles/20201119/spaad-set-permissions.png" title="Set SP AAD App API permission" /></p>
858
858
<h3id="register-aad-app-with-code">Register AAD App with code</h3>
859
859
<p>To register Application permissions, you have to indicate which API you want to use and check the permissions required for you needs. If it's transparent for you when you register through the Azure Portal, let me explain how does it work under the hood.</p>
860
860
<p>Whether you want to work with SharePoint, Microsoft Graph, Dynamics or else, each service is registered as a service principal (Enterprise Application in AAD). And each of these contains <em>AppRoles</em> (for Application permissions) and <em>Oauth2Permissions</em> (Delegated permissions).</p>
@@ -1063,9 +1063,9 @@ <h2 id="register-web-application-api-application">Register Web Application / API
1063
1063
<p>In this example, it will be a Web Application (but in the end, the code used for connecting to SharePoint will be the same).</p>
1064
1064
<p>Once the Web Application created, you will have to enable Managed Identity, in order to allow the resource to access the Key Vault. This will lead in the creation of a service principal you'll be able to find in the AAD Enterprise Applications page.</p>
1065
1065
<h3id="register-the-resource-through-interface">Register the resource through interface</h3>
1066
-
<p><imgalt="alt text" src="../../images/articles/20201100/aad-add-webapp.png" title="Add Web Application" /></p>
1066
+
<p><imgalt="alt text" src="../../images/articles/20201119/aad-add-webapp.png" title="Add Web Application" /></p>
1067
1067
<h3id="enable-managed-identity-through-interface">Enable Managed Identity through interface</h3>
<h2id="upload-key-vault-certificate-into-aad-application">Upload Key Vault Certificate into AAD Application</h2>
1109
1109
<p>By importing the certificate (created with the Key Vault) in the AAD Application, you allow an authentication to SharePoint when requesting access to the Tenant, with a Client ID / Certificate.</p>
1110
1110
<h3id="upload-through-interface">Upload through interface</h3>
1111
-
<p><imgalt="alt text" src="../../images/articles/20201100/aad-upload-cert.png" title="Upload KeyVault Certificate to SP AAD" /></p>
1111
+
<p><imgalt="alt text" src="../../images/articles/20201119/aad-upload-cert.png" title="Upload KeyVault Certificate to SP AAD" /></p>
@@ -1144,7 +1144,7 @@ <h2 id="grant-web-application-to-get-key-vault-secret">Grant Web Application to
1144
1144
<p>When using <ahref="https://www.nuget.org/packages/Microsoft.Azure.KeyVault/" target="_blank">Microsoft.Azure.KeyVault</a> library, we used to grant certificate (GET) access policy to certificate. But as this library is replaced by the Azure.Security .NET Libraries, we have to use the Keyvault.Secrets service because until now, there's no method provided to get a Key Vault Certificate with the certificate (GET) access policy. Furthermore, the Certificate in Key Vault is more a <ahref="https://docs.microsoft.com/en-us/azure/key-vault/certificates/about-certificates" target="_blank">concept</a> than just a type of Secret.</p>
1145
1145
<p>That's why we're going to setup a secret (GET) access policy.</p>
1146
1146
<h3id="grant-access-through-interface">Grant access through interface</h3>
@@ -1311,7 +1311,7 @@ <h2 id="deploy-the-solution">Deploy the solution</h2>
1311
1311
<p>Then select <em>Azure</em> as target, <em>Azure App Service (Windows)</em> and select the correct Azure account, the subscription used until now, the resource group and the Web Application we created together (here <strong>rg-common</strong> and <strong>MyWebApplicationForSharePoint</strong>).</p>
1312
1312
<h2id="thats-it">That's it</h2>
1313
1313
<p>You should see something like this :</p>
1314
-
<p><imgalt="alt text" src="../../images/articles/20201100/webapp.png" title="Web Application SharePoint Site Title" /></p>
1314
+
<p><imgalt="alt text" src="../../images/articles/20201119/webapp.png" title="Web Application SharePoint Site Title" /></p>
1315
1315
<p>If you have any question or if you encounter any problem during the execution of the commands, feel free to send a Tweet or a DM π</p>
0 commit comments