Skip to content

Commit ec9062f

Browse files
authored
Edits.
1 parent d8f087c commit ec9062f

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

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

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ ms.prod: sharepoint
99
Learn how to add a new client secret for a SharePoint Add-in that is registered with AppRegNew.aspx.
1010

1111

12-
**Note** The name "apps for SharePoint" is changing to "SharePoint Add-ins". During the transition, the documentation and the UI of some SharePoint products and Visual Studio tools might still use the term "apps for SharePoint". For details, see [New name for apps for Office and SharePoint](new-name-for-apps-for-sharepoint.md#bk_newname).
12+
>**Note:** The name "apps for SharePoint" is changing to "SharePoint Add-ins". During the transition, the documentation and the UI of some SharePoint products and Visual Studio tools might still use the term "apps for SharePoint". For details, see [New name for apps for Office and SharePoint](new-name-for-apps-for-sharepoint.md#bk_newname).
1313
1414

1515
Client secrets for SharePoint Add-ins that are registered using the AppRegNew.aspx page expire after one year. This article explains how to add a new secret for the add-in, as well as how to create a new client secret that is valid for three years.
1616

1717

18-
**Note** This article is about SharePoint Add-ins that are distributed through an organization catalog and registered with the AppRegNew.aspx page. If the add-in is registered on the Seller Dashboard, see [Create or update client IDs and secrets in the Seller Dashboard](https://dev.office.com/officestore/docs/create-or-update-client-ids-and-secrets#bk_update).
18+
>**Note:** This article is about SharePoint Add-ins that are distributed through an organization catalog and registered with the AppRegNew.aspx page. If the add-in is registered on the Seller Dashboard, see [Create or update client IDs and secrets in the Seller Dashboard](https://dev.office.com/officestore/docs/create-or-update-client-ids-and-secrets#bk_update).
1919
2020

2121

@@ -114,12 +114,12 @@ $newClientSecret
114114

115115

116116

117-
**Tip** By default, the add-in secret lasts one year. You can set this to a shorter or longer (up to 3 years maximum) by using the **-EndDate** parameter on the three calls of the **New-MsolServicePrincipalCredential** cmdlet. The value of the parameter must be a [DateTime](http://msdn2.microsoft.com/EN-US/library/03ybds8y) object set to no longer than 3 years from **DateTime.Now**.
117+
>**Tip:** By default, the add-in secret lasts one year. You can set this to a shorter or longer (up to 3 years maximum) by using the **-EndDate** parameter on the three calls of the **New-MsolServicePrincipalCredential** cmdlet. The value of the parameter must be a [DateTime](http://msdn2.microsoft.com/EN-US/library/03ybds8y) object set to no longer than 3 years from **DateTime.Now**.
118118
119119
## Update the remote web application in Visual Studio to use the new secret
120120

121121

122-
**Important** If your add-in was originally created with a prerelease version the Microsoft Office Developer Tools for Visual Studio, it may contain an out-of-date version of the TokenHelper.cs (or .vb) file. If the file does not contain the string "secondaryClientSecret", it is out-of-date and it 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 file from it to the web application project of your SharePoint Add-in.
122+
>**Important:** If your add-in was originally created with a prerelease version the Microsoft Office Developer Tools for Visual Studio, it may contain an out-of-date version of the TokenHelper.cs (or .vb) file. If the file does not contain the string "secondaryClientSecret", it is out-of-date and it 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 file from it to the web application project of your SharePoint Add-in.
123123
124124

125125

@@ -153,7 +153,7 @@ $newClientSecret
153153
</appSettings>
154154
```
155155

156-
***Important Note*** You will not be able to use the newly generated client secret until the current client secret expires. Therefore, changing the ClientId key to the new client secret without the SecondaryClientSecret key present will NOT work. You MUST follow the above procedure provided here and wait for the previous client secret to expire. Then, you can remove the SecondaryClientSecret if you desire.
156+
>**Important:** You will not be able to use the newly generated client secret until the current client secret expires. Therefore, changing the ClientId key to the new client secret without the SecondaryClientSecret key present will not work. You must follow the procedure in this article and wait for the previous client secret to expire. Then you can remove the SecondaryClientSecret if you want to.
157157
158158
4. If you changed to a new TokenHelper file, rebuild the project.
159159

@@ -180,7 +180,7 @@ connect-msolservice -credential $msolcred
180180

181181
2. Get **ServicePrincipals** and keys. Printing **$keys** returns three records. Replace each **KeyId** in *KeyId1* , *KeyId2* and *KeyId3* . You will also see the **EndDate** of each key. Confirm whether your expired key appers there.
182182

183-
**Note:** The **clientId** needs to match your expired **clientId**. It's recommended to delete all keys, both expired and unexpired, for this **clientId**.
183+
>**Note:** The **clientId** needs to match your expired **clientId**. It's recommended to delete all keys, both expired and unexpired, for this **clientId**.
184184
185185

186186

@@ -220,9 +220,4 @@ $newClientSecret
220220

221221
## See also
222222

223-
224-
#### Other resources
225-
226-
227-
228-
[Provider Hosted App fails on SPO](http://blogs.technet.com/b/sharepointdevelopersupport/archive/2015/03/11/provider-hosted-app-fails-on-spo.aspx)
223+
[Provider Hosted App fails on SPO](http://blogs.technet.com/b/sharepointdevelopersupport/archive/2015/03/11/provider-hosted-app-fails-on-spo.aspx)

0 commit comments

Comments
 (0)