Forum Discussion

Prakash_Singh's avatar
Prakash_Singh
Brass Contributor
Apr 25, 2024
Solved

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...
  • Prakash_Singh's avatar
    May 13, 2024
    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

Resources