Skip to content

Commit ecff12c

Browse files
typos & markdown issues
- always refer to Microsoft Graph with the full name, not "graph" - grammatical fixes - markdown formatting: - scopes aren't inline code; should be BOLD - don't explicitly set numbered bullets; always use "1." and let rendering engine number them correctly
1 parent 9e99b7c commit ecff12c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/sp-add-ins/replace-an-expiring-client-secret-in-a-sharepoint-add-in.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Client secrets for SharePoint Add-ins that are registered by using the **AppRegN
1717
1818
## Recommended maintenance schedule
1919

20-
We recommend creating new secrets a minimum of 30 days before they expire. This gives you a month of time before the old credentials expire.
20+
We recommend creating new secrets a minimum of 30 days before they expire. This gives you a month before the old credentials expire.
2121

2222
We recommend only removing secrets a minimum of 7 days after expiration, provided you have removed them from the application configuration.
2323

@@ -28,7 +28,7 @@ Removing an expired secret from ACS before you remove it from the application co
2828
Ensure the following before you begin:
2929

3030
- You have installed Microsoft Graph Powershell SDK: [Install the Microsoft Graph PowerShell SDK](/powershell/microsoftgraph/installation)
31-
- You're a tenant administrator (or having `Application.ReadWrite.All` permission) for the Microsoft 365 tenant where the add-in was registered with the **AppRegNew.aspx** page.
31+
- You're a tenant administrator (or having **Application.ReadWrite.All** permission) for the Microsoft 365 tenant where the add-in was registered with the **AppRegNew.aspx** page.
3232

3333
## Generate a new secret
3434

@@ -38,13 +38,13 @@ Ensure the following before you begin:
3838
$clientId = 'client id of the add-in'
3939
```
4040
41-
2. Connect to graph with `Application.ReadWrite.All, Directory.ReadWrite.All` scope.
41+
1. Connect to Microsoft Graph with **Application.ReadWrite.All**, **Directory.ReadWrite.All** scope.
4242
4343
```powershell
44-
Connect-MgGraph -Scopes "Application.ReadWrite.All,Directory.ReadWrite.All" # Login with corresponding scope. Should be tenant admin or anyone have the permission.
44+
Connect-MgGraph -Scopes "Application.ReadWrite.All,Directory.ReadWrite.All" # Login with corresponding scope. Should the tenant admin or anyone else have the permission.
4545
```
4646
47-
3. Generate a new client secret with the following lines:
47+
1. Generate a new client secret with the following lines:
4848
4949
```powershell
5050
$appPrincipal = Get-MgServicePrincipal -Filter "AppId eq '$clientId'" # Get principal id by AppId
@@ -80,12 +80,12 @@ Ensure the following before you begin:
8080
$result.EndDateTime # Print the end date.
8181
```
8282
83-
4. The new client secret appears on the Windows PowerShell console. Copy it to a text file. You use it in the next procedure.
83+
1. The new client secret appears on the Windows PowerShell console. Copy it to a text file. You use it in the next procedure.
8484
8585
> [!TIP]
86-
> By default, the secret lasts two years if you didn't specify the EndDateTime. You can customize by leveraging the example below to specify the EndDateTime.
86+
> By default, the secret lasts two years if you didn't specify the EndDateTime. You can customize by using the example below to specify the EndDateTime.
8787
>
88-
> ``` powershell
88+
> ```powershell
8989
> $params = @{
9090
> PasswordCredential = @{
9191
> DisplayName = "NewSecret" # Replace with a firendly name.
@@ -97,7 +97,7 @@ Ensure the following before you begin:
9797
## Update the remote web application in Visual Studio to use the new secret
9898
9999
> [!IMPORTANT]
100-
> If your add-in was originally created with a pre-release version of the Microsoft Office Developer Tools for Visual Studio, it may contain an out-of-date version of the **TokenHelper.[cs|vb]** file. If the file does not contain the string `secondaryClientSecret`, it is out of date and must be replaced before you can update the web application with a new secret. To obtain a copy of a release version of the file, you need Visual Studio 2012 or later. Create a new SharePoint Add-in project in Visual Studio. Copy the **TokenHelper.[cs|vb]** file from it to the web application project of your SharePoint Add-in.
100+
> If your add-in was created with a pre-release version of the Microsoft Office Developer Tools for Visual Studio, it may contain an out-of-date version of the **TokenHelper.[cs|vb]** file. If the file does not contain the string `secondaryClientSecret`, it is out of date and must be replaced before you can update the web application with a new secret. To obtain a copy of a release version of the file, you need Visual Studio 2012 or later. Create a new SharePoint Add-in project in Visual Studio. Copy the **TokenHelper.[cs|vb]** file from it to the web application project of your SharePoint Add-in.
101101
102102
1. Open the SharePoint Add-in project in Visual Studio, and open the **web.config** file for the web application project. In the `appSettings` section, there are keys for the client ID and client secret. The following is an example:
103103

0 commit comments

Comments
 (0)