Skip to content

Commit 821cbbc

Browse files
lafeVesaJuvonen
authored andcommitted
Fixed code example (SharePoint#3500)
Included usings that were outside the scope of the code snippet
1 parent 0c4da7e commit 821cbbc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/solution-guidance/security-apponly-azureacs.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Next step is granting permissions to the newly created principal. Since we're gr
1818

1919
To grant permissions, you'll need to provide the permission XML that describes the needed permissions. Since this application needs to be able to access all sites + also uses search with app-only it needs below permissions:
2020

21-
```
21+
```XML
2222
<AppPermissionRequests AllowAppOnlyPolicy="true">
2323
<AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl" />
2424
</AppPermissionRequests>
@@ -48,10 +48,11 @@ using (var cc = new AuthenticationManager().GetAppOnlyAuthenticatedContext(siteU
4848

4949
## Using this principal in your application without using the PnP Sites Core library
5050
Once the principal is created and consented you can use the principal's id and secret to request an access. The TokenHelper.cs class will grab the id and secret from the application's configuration file.
51+
52+
```csharp
5153
using Microsoft.SharePoint.Client;
5254
using System;
5355

54-
```csharp
5556
namespace AzureACSAuth
5657
{
5758
class Program

0 commit comments

Comments
 (0)