Forum Discussion
Prakash_Singh
Apr 25, 2024Brass Contributor
Enterprise application app secrete key need to update for SharePoint Online access.
Hi, I need to update the app secrete key which is already expired so that client can access SharePoint online site with app id and key. Problem is that this app I can only see under "Enterprise app...
- May 13, 2024I found the PowerShell Command:
$app = Get-AzureADServicePrincipal -objectID ""
#Get the Current Expiry Date
$CurrentExpiryDate = (Get-AzureADServicePrincipalPasswordCredential -ObjectId $App.ObjectId).EndDate
#Extend the validity of the App by 1 years
$StartDate = Get-Date
$EndDate = $StartDate.AddYears(1)
New-AzureADServicePrincipalPasswordCredential -ObjectId $App.ObjectId -StartDate $StartDate -EndDate $EndDate
Prakash_Singh
May 13, 2024Brass Contributor
I found the PowerShell Command:
$app = Get-AzureADServicePrincipal -objectID ""
#Get the Current Expiry Date
$CurrentExpiryDate = (Get-AzureADServicePrincipalPasswordCredential -ObjectId $App.ObjectId).EndDate
#Extend the validity of the App by 1 years
$StartDate = Get-Date
$EndDate = $StartDate.AddYears(1)
New-AzureADServicePrincipalPasswordCredential -ObjectId $App.ObjectId -StartDate $StartDate -EndDate $EndDate
$app = Get-AzureADServicePrincipal -objectID ""
#Get the Current Expiry Date
$CurrentExpiryDate = (Get-AzureADServicePrincipalPasswordCredential -ObjectId $App.ObjectId).EndDate
#Extend the validity of the App by 1 years
$StartDate = Get-Date
$EndDate = $StartDate.AddYears(1)
New-AzureADServicePrincipalPasswordCredential -ObjectId $App.ObjectId -StartDate $StartDate -EndDate $EndDate