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
This proposed change fixes a few issues in the document:
- There was an inconsistency between the one-year client secret script and the three-year one - namely that the first adds 1 year to the current date on three different lines, while the second calculates the end date first, and uses it. I have made the first script consistent with the second, which is the cleaner of the two.
- The information about deleting old keys was confusing:
- It instructed the user to manually copy & paste the key ids in their script. Manually copy/pasting them is not necessary when the $keys variable can be used to pass the keys into `Remove-MsolServicePrincipalCredential`.
- It was further confusing because the line where they're supposed to paste the keys is immediately after the line retrieving the keys, and there was nothing in the script that would output them to the console so they could copy/paste them.
These changes should hopefully make this document a bit clearer.
@@ -128,15 +130,21 @@ For expired client secrets, first you must delete all of the expired secrets for
128
130
connect-msolservice -credential $msolcred
129
131
```
130
132
131
-
1. Get **ServicePrincipals** and keys. Printing **$keys** returns three records. Replace each **KeyId** in **KeyId1**, **KeyId2**, and **KeyId3**. You also see the **EndDate** of each key. Confirm whether your expired key appears there.
133
+
1. Get **ServicePrincipals** and keys. Printing **$keys** returns three records. You also see the **EndDate** of each key. Confirm whether your expired key appears there.
132
134
133
135
> [!NOTE]
134
136
> The **clientId** needs to match your expired **clientId**. It's recommended to delete all keys, both expired and unexpired, for this **clientId**.
1. Generate a new **ClientSecret** for this **clientID**. It uses the same **clientId** as set in the preceding step. The new **ClientSecret** is valid for three years.
0 commit comments