Monday, September 19, 2016

Invalid JWT token. Could not resolve issuer token.

For the second time in three years. I have had the pleasure of encounter a "Invalid JWT token. Could not resolve issuer token." Error. The error comes from a provider-hosted add-in which worked fine the day before. The last time I got the error, I ended up recreate my client ID and client secret both in SharePoint online and need to update my web.config. But this year I was keen on finding a solution! After some time to even understand the error message. I found this article "Replace an expiring client secret in a SharePoint Add-in" https://msdn.microsoft.com/en-us/library/office/dn726681.aspx. Article goes step-by-step how to update your client secret. I have updated the script, as I allready knew my add-in name.

#set the name of my add-in
$displayName = "governanceapp"
Connect-MsolService
$appentry = Get-MsolServicePrincipal -all  | ? { $_.DisplayName -eq $displayName}
$principalId = $appentry.AppPrincipalId
$bytes = New-Object Byte[] 32
$rand = [System.Security.Cryptography.RandomNumberGenerator]::Create()
$rand.GetBytes($bytes)
$rand.Dispose()
$newClientSecret = [System.Convert]::ToBase64String($bytes)
New-MsolServicePrincipalCredential -AppPrincipalId $principalId -Type Symmetric -Usage Sign -Value $newClientSecret
New-MsolServicePrincipalCredential -AppPrincipalId $principalId -Type Symmetric -Usage Verify -Value $newClientSecret
New-MsolServicePrincipalCredential -AppPrincipalId $principalId -Type Password -Usage Verify -Value $newClientSecret
#this go into the web.config
$newClientSecret

Saturday, August 27, 2016

New event in the Danish SharePoint community SPBG ERFA omkring SharePoint Framework

A new event in the Danish SharePoint community has been posted on the user group website. Read more about SharePoint Bruger Gruppe (SPBG): Møder at http://ift.tt/2bnC4n9

Thursday, August 25, 2016

SPBG ERFA omkring SharePoint Framework

Hej SharePointer

Kom til SPBG erfa møde onsdag den 21. september, i København, og mød Per Jakobsen. Per er Principal Developer fra ProActive. Per vil give en introduktion til det nye SharePoint Framework og om de nye teknologier som det bygger på. Vi afholder mødet hos KMD fra kl. 17:00 til ca. 19 tiden. S.U den 19. septmenber. Tilmelding sker på https://www.meetup.com/Danish-SharePoint-User-Group-SPBG/

Husk vi flyttet til meetup.com, se mere her https://www.meetup.com/Danish-SharePoint-User-Group-SPBG/

Friday, June 24, 2016

SPBG Office 365 Dev Camp 2016

Kom til et gratis heldags arrangement omkring udvikling i Office 365 i København den 16. august 2016.

På dagen bliver der givet en introduktion til ASP.NET Core 1.0 og gennemgår Office 365 Dev Patterns & Practices (PnP) (http://dev.office.com/patterns-and-practices). Kendskab til SharePoint/Office 365 udvikling ikke nødvendig!

Agenda:

  • ASP.NET Core 1.0 introduktion niveau.
  • Hvad er Office 365 Dev Patterns & Practices (PnP) og basis operationer.
  • PnP Timer Job Framework.
  • Authentication Manager.
  • Site Provisioning Framework og PnP PowerShell.

Read more about the event here https://devcamp2016.eventbrite.com

Thursday, June 23, 2016

New event in the Danish SharePoint community SPBG Office 365 Dev Camp 2016

A new event in the Danish SharePoint community has been posted on the user group website. Read more about SharePoint Bruger Gruppe (SPBG): Møder at http://ift.tt/28RJ25l