tag:blogger.com,1999:blog-36645977947808722602024-03-13T00:31:33.390+01:00Anders DissingA SharePoint thingAnders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.comBlogger140125tag:blogger.com,1999:blog-3664597794780872260.post-1397864698132778072019-02-08T08:48:00.000+01:002019-02-08T08:48:10.653+01:00Connect to SharePoint online, with an account has multi factor authentication (MFA) enable<p>
When I deliver PowerShell script to a customer, that contains log in / credential, I normal use this line of code:<br><br>
$user = "user@tenant.com"<br>
$password = "ZXY" | ConvertTo-SecureString -AsPlainText -Force<br>
$credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $password<br>
$url = "<a href="https://tenant.sharepoint.com"">https://tenant.sharepoint.com"</a><br> <br>
Connect-PnPOnline -Url $url -Credentials $credential </p>
<p>Or reading the password from disk like this:<br><br>
$user = "user@tenant.com"<br>
$password = Get-Content .\password.txt -Raw | ConvertTo-SecureString -AsPlainText -Force<br>
$credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $password<br>
$url = "<a href="https://tenant.sharepoint.com"">https://tenant.sharepoint.com"</a><br> <br>
Connect-PnPOnline -Url $url -Credentials $credential </p>
<p>Or from Windows Credential Manager, <a href="https://github.com/SharePoint/PnP-PowerShell/wiki/How-to-use-the-Windows-Credential-Manager-to-ease-authentication-with-PnP-PowerShell">https://github.com/SharePoint/PnP-PowerShell/wiki/How-to-use-the-Windows-Credential-Manager-to-ease-authentication-with-PnP-PowerShell</a>.<br>
</p><p>But this will not work if the customer account is configured for use multi factor authentication (MFA). The PnP/PowerShell script will return with an error message: </p><p>“The remote server returned an error: (403) Forbidden”</p><p>Luckily, we can work around this errror, by using the UseWebLogin. When using the UseWebLogin parameter a Windows Form will open and show an IE control that navigate to the Office 365 log in page. And this process support MFA login.<br><br>
$url = "<a href="https://ameq.sharepoint.com"">https://ameq.sharepoint.com"</a><br> <br>
Connect-PnPOnline -Url $url -UseWebLogin </p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com4tag:blogger.com,1999:blog-3664597794780872260.post-44256525726741671612018-03-22T07:59:00.000+01:002018-03-22T07:59:19.551+01:00SPBG ERFA møde omkring Modern Office 365 Add-in<p>Kom til SPBG erfa møde torsdag den 3. maj, i København, og mød Alon Ekelund. Alon er CEO hos iGlobe. Alon vil tale om hvad er en Modern Office 365 Add-in er, hvilke forskellige typer der findes, Sikkerhed i Add-in, udforinger omkring Office Store, så som, deployment og vedligehold og den nye corporate Add-in catalog . Samt give et oplæg omkring hvordan Office Add-ins kan give en bedre udnyttelse af Office 365 og dermed mere ud af investeringen i platformen. Vi afholder mødet hos ProActive A/S, Rosenørns Allé 1, 1970 Frederiksberg C fra kl. 17:00 til ca. 19 tiden. S.U den 30. april. Tilmelding sker på <a href="http://spbg.dk/">http://spbg.dk</a></p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com2tag:blogger.com,1999:blog-3664597794780872260.post-23296664614266759762018-01-19T11:12:00.000+01:002018-01-19T11:12:09.039+01:00Office 365, Security & Compliance og GDPR<p>Kom til at gratis halvdags arrangement i SharePoint Bruger Gruppen (SPBG) omkring Office 365, Security & Compliance og GDPR, hvor Ole Kjeldsen fra Microsoft Danmark kommer.<br>Ole er Teknologi- & Sikkerhedsdirektør og er en af de førende i Danmark inden for sikkerhed i Office 365 og hvordan Office 365 understøtter GDPR.</p><p>Ole vil tale om:<br></p><ul><li>Grundlæggende forståelse af GDPR og Office 365.<br></li><li>Security & Compliance Center.<br></li><li>Office 365 Secure Score.<br></li></ul><p>Arrangement er den 22. februar 2018. Fra kl. 9:00 til 12:30. Morgenmad fra kl. 8:00. </p><p>Arrangement bliver holdt hos:<br>Symbion A/S<br>Fruebjergvej 3<br>2100 København Ø<br>Tilmelding sker via Meetup, på <a href="http://spbg.dk">http://spbg.dk</a>. </p><p>Tak til vores sponsorer. Pointwork for at sponsorerer lokaler og Viteco for at sponsorerer morgenmaden.</p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-62153407123590486552018-01-16T08:20:00.000+01:002018-01-16T08:20:03.945+01:00ESPC18 - 2 for 1 code<p>Hvis du ikke allerede har hørt det, så godt nyt! Europe's største SharePoint, Office 365 & Azure Conference kommer til København i år! Konferencen er fra den 26.-29. november 2018. Hvis du og en ven meget gerne vil deltage, har jeg endnu bedre nyt. Hvis du skriver dig op til en ”2 for 1 code” og køber din billet torsdag den 23. januar og bruger din ”2 for 1” koden, får du en billet gratis.<p>Link til “2 for 1” kode, <a href="https://www.sharepointeurope.com/?utm_source=ESPC+Members+Newsletter&utm_campaign=231ddf873c-EMAIL_CAMPAIGN_2018_01_08&utm_medium=email&utm_term=0_82a101e0da-231ddf873c-237375729">https://www.sharepointeurope.com/?utm_source=ESPC+Members+Newsletter&utm_campaign=231ddf873c-EMAIL_CAMPAIGN_2018_01_08&utm_medium=email&utm_term=0_82a101e0da-231ddf873c-237375729</a><h4>Skal du bruge input til din chef for at få lov til at deltage?</h4><p><b>Fordele ved at deltage i ESPC18</b><ul><li>På uge, opnå hvad der svare til et 1 år viden opsamling.<li>Kør forbi konkurrenterne når du lærer det nyeste fra de allerbedste globale eksperter.<li>Mød 2.000 kolleger fra hele Europa for at dele ideer og se, hvordan de løser de samme daglige udfordringer som dine.<li>Forbind prikkerne mellem alt hvad du har læst, hørt, overvejet eller arbejdet hele året.</li></ul>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-43815706501590960062018-01-11T08:21:00.000+01:002018-01-11T08:21:35.463+01:00Deploying my website to a Windows Virtual Machine aka deploy to an on-premise IIS webserver.<p>The setup where working with Visual Studio Online and have a customer, how is running everything on-premise has been quite frustrating. But not anymore! After the release of the feature “Deployment groups” it is now the easiest thing to do. <p>To over simplify the tasks for configuring Deployment groups. You need only to create a new deployment group in Visual Studio Online, “register machine” and run some PowerShell. And you are done <img class="wlEmoticon wlEmoticon-smile" style="" alt="Smile" src="https://lh3.googleusercontent.com/-sa1TxF5F01M/WlB4-AnXrBI/AAAAAAAAAuk/KsD-_V5VgQgvykHiPFunkRcYffBhnMhjwCHMYCw/wlEmoticon-smile%255B2%255D?imgmax=800"><p>The how-to guide to setup and create Deployment Groups can be found here <a href="https://docs.microsoft.com/en-us/vsts/build-release/apps/cd/deploy-webdeploy-iis-deploygroups">https://docs.microsoft.com/en-us/vsts/build-release/apps/cd/deploy-webdeploy-iis-deploygroups</a><p>N.B. The how-to show you need two tasks to deploy the website. This is not correct. This remove these tasks and add the task “Deploy IIS Website/App”. <p>Before you can release anything, setup you build. By following this how-to guide for ASP.NET 4, <a href="https://docs.microsoft.com/en-us/vsts/build-release/apps/aspnet/build-aspnet-4?tabs=vsts">https://docs.microsoft.com/en-us/vsts/build-release/apps/aspnet/build-aspnet-4?tabs=vsts</a><p>And this how-to guide for ASP.NET Core, <a href="https://docs.microsoft.com/en-us/vsts/build-release/apps/aspnet/build-aspnet-core?tabs=gitvsts%2Cweb%2Cdeploy-windows">https://docs.microsoft.com/en-us/vsts/build-release/apps/aspnet/build-aspnet-core?tabs=gitvsts%2Cweb%2Cdeploy-windows</a>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com1tag:blogger.com,1999:blog-3664597794780872260.post-10918414787026541762017-12-15T19:22:00.001+01:002017-12-15T19:22:25.275+01:00Print all file in a folder<p>Twice a year I have to print a lot of files in different formats. It's easy to do with a little PowerShell:</p><p>Get-ChildItem c:\receipt\ | ForEach-Object {start-process $_.FullName –Verb Print}</p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-39593937684583165742017-12-04T08:00:00.000+01:002017-12-04T08:00:30.759+01:00Deploying Office Online Server 2016 to a security hardened drive<p>I was installing an Office Online Server. And properly the easy thing to install in a complete SharePoint farm setup <img class="wlEmoticon wlEmoticon-smile" style="" alt="Smile" src="https://lh3.googleusercontent.com/-mIs8Erdo_uc/Wh_ayLI2t3I/AAAAAAAAAt0/N-rv2D1jDzogiFuaQw1yJZ8qirA4cBgDgCHMYCw/wlEmoticon-smile%255B2%255D?imgmax=800"> After installing and configuring the OOS farm. I did a bit of testing. But I ended up with this error:<p><a href="https://lh3.googleusercontent.com/-VgSkNXUjeUI/Wh_ay1XZkDI/AAAAAAAAAt4/6cMX1BQYcNYij64YjrKe2lD9ooe-nZqrgCHMYCw/s1600-h/clip_image002%255B4%255D"><img width="464" height="484" title="clip_image002" style="display: inline; background-image: none;" alt="clip_image002" src="https://lh3.googleusercontent.com/-PwnLItMCIWg/Wh_azgQCwMI/AAAAAAAAAt8/RnNNQlSGFDEP5wkPqqZAskDxQoUXaoCPgCHMYCw/clip_image002_thumb%255B1%255D?imgmax=800" border="0"></a><p>This error only occur on Word file, not PowerPoint or Excel file <img class="wlEmoticon wlEmoticon-confusedsmile" style="" alt="Confused smile" src="https://lh3.googleusercontent.com/-W35rPhDLrGA/Wh_a0aIBkXI/AAAAAAAAAuA/JTQQbJissHc2XJfq1rdl7g3bGF2_wUr2wCHMYCw/wlEmoticon-confusedsmile%255B2%255D?imgmax=800"><p>After a lot a googling, I found the reason is I installed the OOS on to a D drive “a security hardened drive”.<p><a href="https://blogs.technet.microsoft.com/office_web_apps_server_2013_support_blog/2013/11/26/deploying-office-web-apps-server-2013-to-a-security-hardened-drive/">https://blogs.technet.microsoft.com/office_web_apps_server_2013_support_blog/2013/11/26/deploying-office-web-apps-server-2013-to-a-security-hardened-drive/</a>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-90961397784328188392017-11-16T13:00:00.000+01:002017-11-16T13:00:35.132+01:00Global Office 365 Developer Bootcamp - Cheatsheet<p>List of useful links introduce doing the SPBG Global Office 365 Developer Bootcamp:<ul><li>Test site to send cards through Groups connectors<br><a href="https://connectplayground.azurewebsites.net/">https://connectplayground.azurewebsites.net/</a></li><li>Configuration site to setup Groups connectors<br><a href="https://outlook.office.com/connectors/publish">https://outlook.office.com/connectors/publish</a></li><li>Documentation for cards<br><a href="https://docs.microsoft.com/en-us/outlook/actionable-messages/card-reference">https://docs.microsoft.com/en-us/outlook/actionable-messages/card-reference</a></li><li>Card playground. To test and see how cards looks like<br><a href="https://messagecardplayground.azurewebsites.net/">https://messagecardplayground.azurewebsites.net/</a></li></ul><p><a title="https://messagecardplayground.azurewebsites.net/" href="https://messagecardplayground.azurewebsites.net/"><br></a></p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-67207457259530782792017-10-23T08:30:00.000+02:002017-10-23T08:30:01.411+02:00Add Usage Guidelines Url for Office 365 Group<p>While I was configuring Classification for Groups, when I sported the UsageGuidelinesUrl and GuestUsageGuidelinesUrl option. When set, a link appears in the Site Information box.<p><a href="https://lh3.googleusercontent.com/-wZgTq_Gfy7Q/WeXKYLbEuzI/AAAAAAAAAtM/2N8hXAawi2wb0GLLB0-WmO6uWjv_2MhYQCHMYCw/s1600-h/Guideline%255B8%255D"><img width="461" height="772" title="Guideline" style="display: inline; background-image: none;" alt="Guideline" src="https://lh3.googleusercontent.com/-TYfAN6jtjog/WeXKYkVpzWI/AAAAAAAAAtQ/oxokukkr0K8sEHoRpSkXIEYJqYwUOzkpwCHMYCw/Guideline_thumb%255B4%255D?imgmax=800" border="0"></a><p>PowerShell to add, update, read and remove the guidelines urls<p><strong>Add</strong><p># get the settings id default template for Groups<br>
$settingTemplateID = Get-AzureADDirectorySettingTemplate | ? -Property "DisplayName" -Value "Group.Unified" -EQ | select -ExpandProperty ID<br>
#get the tempalte object<br>
$Template = Get-AzureADDirectorySettingTemplate -Id $settingTemplateID<br>
#create a setting object<br>
$newSetting = $template.CreateDirectorySetting()<br>
#set the property<br>
$newSetting["GuestUsageGuidelinesUrl"] = "<a href="http://guestguideline.com"">http://guestguideline.com"</a><br>
$newSetting["UsageGuidelinesUrl"] = "<a href="https://guideline.com"">https://guideline.com"</a><br>
#save the settings object back to Office 365<br>
New-AzureADDirectorySetting -DirectorySetting $newSetting</p><p><strong>Update</strong></p><p>#Get the setting id for Groups<br>
$settingID = Get-AzureADDirectorySetting | Where-object -Property Displayname -Value "Group.Unified" -EQ | select -ExpandProperty ID<br>
#Get current settings object with the Groups ID<br>
$setting = Get-AzureADDirectorySetting –Id $settingID<br>
#Update the property<br>
$Setting["UsageGuidelinesUrl"] = "<a href="https://my-tenant.sharepoint.com/"">https://my-tenant.sharepoint.com/"</a><br>
$Setting["GuestUsageGuidelinesUrl"] = "<a href="http://public-url"">http://public-url"</a><br>
#Save the settings object back to Office 365<br>
Set-AzureADDirectorySetting -Id $settingID -DirectorySetting $Setting</p><p><strong>Read</strong></p><p>#read all settings<br>
(Get-AzureADDirectorySetting -All $True).Values</p><p><strong>Remove – All settings for Groups!</strong></p><p>#remove all settings<br>
$settingID = Get-AzureADDirectorySetting | Where-object -Property Displayname -Value "Group.Unified" -EQ | select -ExpandProperty ID<br>
Remove-AzureADDirectorySetting –Id $settingID</p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com2tag:blogger.com,1999:blog-3664597794780872260.post-35659098706015904362017-09-19T08:00:00.000+02:002017-09-19T08:00:22.347+02:00Global Office 365 Developer Bootcamp<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOKpzWkp1CH9fWa2Z1QqVOqSK4gcLyZQw3eNaT-z_f6QCEum3sQi98b_1Zk-7r5gPm5WztM-dH-nZhTmOFVBNIVDjKpS2Thr16Gk3RO9NLp1O9KDhEwJYmh4snx73r7dSP-aRQDAvFIDE/s1600/BootCamp+Logo+-+Light.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="140" data-original-width="520" height="86" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOKpzWkp1CH9fWa2Z1QqVOqSK4gcLyZQw3eNaT-z_f6QCEum3sQi98b_1Zk-7r5gPm5WztM-dH-nZhTmOFVBNIVDjKpS2Thr16Gk3RO9NLp1O9KDhEwJYmh4snx73r7dSP-aRQDAvFIDE/s320/BootCamp+Logo+-+Light.png" width="320" /></a></div>
If you work with Office 365 development, the Danish SharePoint User Group (SPBG) has an event that is interesting to you. The event is free, about developments in Microsoft Graph and Microsoft Teams. November 16, 2017. Arrangements consist of theory and hands-on labs. Read more about event and registration at <a href="https://www.meetup.com/Danish-SharePoint-User-Group-SPBG/events/243080575/">https://www.meetup.com/Danish-SharePoint-User-Group-SPBG/events/243080575/</a><br />Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-88162872575149097282017-07-04T08:00:00.000+02:002017-07-04T08:00:32.744+02:00SPBG ERFA møde omkring Microsoft Teams<p>Kom til SPBG erfa møde torsdag den 24. august, i København, og mød Peter Lunding Smith. Peter er Director Cloud & Innovation fra ProActive. Peter vil give en introduktion til Microsoft Teams og fortælle om hvordan du kommer i gang med at bruge Teams og hvad man kan bruge i forretningen. Vi afholder mødet hos Executives' Global Network fra kl. 17:00 til ca. 19 tiden. S.U den 20. august. Tilmelding sker på http://spbg.dk</p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-62870824824842638002017-03-27T09:00:00.000+02:002017-03-27T09:00:23.246+02:00The lazy man’s Select-Object Expression<p>I have known the Select-Object Expression pattern since I started with PowerShell. Where the syntax is this: <p>select-object @{Name="Property1"; Expression={$_.PropertyObject.Property1}} <p>But a new PowerShell tip I lean this week is a syntax: <p>select-object {$_.PropertyObject.Property1} <p>The big difference is the headline on the column. In the first example, I control the column headline and the second example the headline will be: <p>$_.PropertyObject.Property1<br>-----------------------------------------</p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-73979586973502453932017-03-10T09:00:00.000+01:002017-03-10T09:00:12.033+01:00Microsoft Office Developer Community Events, SPFx, MS Graph og Teams<p>Kom til et gratis heldags arrangement omkring udvikling i SharePoint Framework, Microsoft Graph og Microsoft Teams i København den 11. maj 2017.<br><br>På dagen bliver der givet en introduktion til udvikling i det nye SharePoint Framework, Microsoft Graph og Microsoft Teams. Kendskab til SharePoint/Office 365 udvikling ikke nødvendig, dog en fordel hvis du kan kode noget i forvejen!<br><br>Agenda: </p> <ul> <li>SharePoint Framework. <li>Microsoft Graph. <li>Microsoft Teams: Bots, Connectors og Tabs.</li></ul> <p>Format: <br>Formatet for dagen vil være, at der bliver en del teori, i form af PowerPoint og demo. Men en rigtig stor del af dagen vil gå med demo, hvor deltagerne selv koder med (hands-on-labs).</p> <p>Du kan læse mere her og tilmelde, <a href="https://www.linkedin.com/redir/redirect?url=https%3A%2F%2Fwww%2Emeetup%2Ecom%2FDanish-SharePoint-User-Group-SPBG%2Fevents%2F238107058%2F&urlhash=ywkh&_t=tracking_anet">https://www.meetup.com/Danish-SharePoint-User-Group-SPBG/events/238107058/</a></p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com2tag:blogger.com,1999:blog-3664597794780872260.post-7254122979457092902017-03-07T09:00:00.001+01:002017-03-07T09:00:04.250+01:00Microsoft Tech Summit Copenhagen<p>Microsoft Tech Summit is comming to Copenhagen. If you have not already seen it, Microsoft is organizing a Tech Summit. The event is free. The event is on March 30-31, 2017. You can read more about the event and sign up for it there <a href="https://www.microsoft.com/da-dk/techsummit/copenhagen.aspx">https://www.microsoft.com/da-dk/techsummit/copenhagen.aspx</a></p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com1tag:blogger.com,1999:blog-3664597794780872260.post-45958903389102047662017-02-28T09:00:00.000+01:002017-02-28T09:00:15.810+01:00Filter on multible coluFilter on multiple columns in SharePoint rest API<p>I’m build a small JavaScript/REST base application for a customer. Where we to filter on three columns. Filter on one column is easy and straight forward. $filter=MyColumn eq 'myvalue’. But filtering on multiple columns is not as apparent. When I was read the documentation on it. It seems you need to add $filter multiple time to the query. But that is not true. The $filter operator shall only be added one time. Insert added AND/OR between them yours filters. Like $filter=MyColumn1 eq 'myvalue’ AND MyColumn2 eq ‘myvalue’. Or in my case, where I need to find an item between a minimal value and a maximum value.</p> <pre name="code" class="javascript">"$filter=BodyRef eq '" + result + "' and Min le '" + size + "' and Max ge '" + size + "'"</pre>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-18193425656972380682017-02-27T08:45:00.001+01:002017-02-27T08:45:51.003+01:00Get SharePoint logs<p>It is getting old PowerShell script but did need it recently. The script collection log files from all the servers in the farm for a given period. <p>Tip: $time is the copy/paste value from the SharePoint error message box. <pre name="code" class="powershell">$time = "23-02-2017 11:26:52"<br>$time = $time.Trim()<br>$timeToAdd = 10<br>$startTime = [Datetime]::Parse($time)<br>$endTime = $startTime.AddSeconds($timeToAdd)<br>$path = "c:\temp\log $($time.Replace(":", [String]::Empty)).txt"<br>Merge-SPLogFile -StartTime $startTime -EndTime $endTime -Path $path -Overwrite</pre>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-18960719621857804642016-09-19T08:42:00.000+02:002016-09-19T08:42:05.890+02:00Invalid JWT token. Could not resolve issuer token.<p class="MsoNormal" style="margin: 0cm 0cm 8pt"><span lang="EN" style="font-family: "Arial",sans-serif; color: #222222; mso-ansi-language: en">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" <a href="https://msdn.microsoft.com/en-us/library/office/dn726681.aspx" target="_blank">https://msdn.microsoft.com/en-us/library/office/dn726681.aspx</a>. Article goes step-by-step how to update your client secret. I have updated the script, as I allready knew my add-in name.</span></span><span lang="EN-US" style="mso-ansi-language: en-us"><?xml:namespace prefix = "o" ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></span></p> <p>#set the name of my add-in<br>$displayName = "governanceapp" <br>Connect-MsolService<br>$appentry = Get-MsolServicePrincipal -all | ? { $_.DisplayName -eq $displayName}<br>$principalId = $appentry.AppPrincipalId<br>$bytes = New-Object Byte[] 32<br>$rand = [System.Security.Cryptography.RandomNumberGenerator]::Create()<br>$rand.GetBytes($bytes)<br>$rand.Dispose()<br>$newClientSecret = [System.Convert]::ToBase64String($bytes)<br>New-MsolServicePrincipalCredential -AppPrincipalId $principalId -Type Symmetric -Usage Sign -Value $newClientSecret<br>New-MsolServicePrincipalCredential -AppPrincipalId $principalId -Type Symmetric -Usage Verify -Value $newClientSecret<br>New-MsolServicePrincipalCredential -AppPrincipalId $principalId -Type Password -Usage Verify -Value $newClientSecret<br>#this go into the web.config<br>$newClientSecret </p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com37tag:blogger.com,1999:blog-3664597794780872260.post-37791747285460796852016-08-27T02:33:00.001+02:002016-08-27T02:33:05.661+02:00New event in the Danish SharePoint community SPBG ERFA omkring SharePoint FrameworkA 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
Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com2tag:blogger.com,1999:blog-3664597794780872260.post-41571275328405787382016-08-25T08:00:00.000+02:002016-08-25T08:00:29.090+02:00SPBG ERFA omkring SharePoint Framework<p>Hej SharePointer <p>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å <a href="https://www.meetup.com/Danish-SharePoint-User-Group-SPBG/">https://www.meetup.com/Danish-SharePoint-User-Group-SPBG/</a> <p>Husk vi flyttet til meetup.com, se mere her <a href="https://www.meetup.com/Danish-SharePoint-User-Group-SPBG/">https://www.meetup.com/Danish-SharePoint-User-Group-SPBG/</a></p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com2tag:blogger.com,1999:blog-3664597794780872260.post-87932568245429884762016-06-24T08:30:00.000+02:002016-06-24T08:30:11.955+02:00SPBG Office 365 Dev Camp 2016<p>Kom til et gratis heldags arrangement omkring udvikling i Office 365 i København den 16. august 2016.</p> <p>På dagen bliver der givet en introduktion til ASP.NET Core 1.0 og gennemgår Office 365 Dev Patterns & Practices (PnP) (<a href="http://dev.office.com/patterns-and-practices">http://dev.office.com/patterns-and-practices</a>). Kendskab til SharePoint/Office 365 udvikling ikke nødvendig!</p> <h4>Agenda:</h4> <ul> <li>ASP.NET Core 1.0 introduktion niveau. <li>Hvad er Office 365 Dev Patterns & Practices (PnP) og basis operationer. <li>PnP Timer Job Framework. <li>Authentication Manager. <li>Site Provisioning Framework og PnP PowerShell.</li></ul> <p><a href="http://devcamp2016.eventbrite.com/" target="_blank">Read more about the event here https://devcamp2016.eventbrite.com</a></p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com4tag:blogger.com,1999:blog-3664597794780872260.post-22733905378979707562016-06-23T18:58:00.001+02:002016-06-23T18:58:36.672+02:00New event in the Danish SharePoint community SPBG Office 365 Dev Camp 2016A 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
Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-62297049211548796912016-05-10T07:30:00.000+02:002016-05-10T07:30:06.434+02:00SharePoint dinner 09/06/2016<p>Så er det tid til SharePoint dinner i København, mere præcist den torsdag 9. juni. Denne gang afholder vi det på TGI Fridays (<a href="http://www.tgifridays.dk/)">http://www.tgifridays.dk/)</a>.<br>Læse mere om event her <a href="http://spbg.dk/Lists/Mder/DispForm.aspx?ID=85">http://spbg.dk/Lists/Mder/DispForm.aspx?ID=85</a><br>Hvis du ikke ved hvad SharePoint dinner gå ud på kan du læse om det her "Hvad er SharePoint dinner" (<a href="http://sharepointbrugergruppe.dk/Pages/Hvad%20er%20SharePoint%20dinner.aspx)">http://sharepointbrugergruppe.dk/Pages/Hvad%20er%20SharePoint%20dinner.aspx)</a><br> <br>Obs! Tilmelding sker på <a href="https://spdinner20160609.eventbrite.com">https://spdinner20160609.eventbrite.com</a> og seneste den mandag den 6. juni. </p>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-70236587594986030982016-05-09T19:10:00.001+02:002016-05-09T19:10:32.591+02:00New event in the Danish SharePoint community SharePoint dinner 09/06/2016A 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/1rD7Kdm
Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0tag:blogger.com,1999:blog-3664597794780872260.post-32537288584719771702016-04-27T08:30:00.000+02:002016-04-27T08:30:10.348+02:00Use “runas” when testing different user roles<p>A common scenario when testing SharePoint is to switch between multiple user accounts to imitate different user roles. A normal way to do this is to use SharePoints “sign in as a different user” function or right click on a browser/program and use the “run as a different user” function in windows. <p>The first method can result in you are sign in as the current user when you are browsers other resources dependent on your internet explorer settings. <p>The second will solve this problem. But you need to enter username and password each time you start a new browser session. <p>To overcome you need to enter username and password each time. You can use the “runas” program call from a .bat file. With the syntax like this, can you indicate the username. And you only need to enter the password the first time you run the .bat file: <p>runas /user:[domain\username] /savecred “[path to browser/program]” <p>e.g. <p>runas /user:domain\SP13TestAO1 /savecred "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" <p>And create a .bat file for each user role, it is easy to switch between user session: <p><a href="https://lh3.googleusercontent.com/-0sVb3-HAObU/Vx-Yh219PLI/AAAAAAAAArk/LwlHxUsAoOs/s1600-h/image%25255B5%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="https://lh3.googleusercontent.com/-YMxBw_KS38I/Vx-YiXP7WpI/AAAAAAAAAro/N_PcG1pxwOI/image_thumb%25255B1%25255D.png?imgmax=800" width="230" height="244"></a>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com1tag:blogger.com,1999:blog-3664597794780872260.post-14198242521306644432016-04-25T08:01:00.000+02:002016-04-25T08:01:07.069+02:00WebAPI plain text response<p>I got a problem where the solution was to create a globe JavaScript object and I need to render the data on the server. <p>I would like to use the JavaScript object like: <p><span id="text"></span><br><script><br>var d = document.getElementById("text");<br>d.innerText = resources.hello;<br></script> <p>I started by creating a WebAPI controller and return a string through the Ok method. And end up with this: <p><a href="https://lh3.googleusercontent.com/-svbhB-XEdQM/VxoGNKprs1I/AAAAAAAAArI/_1_o-nJBMI4/s1600-h/clip_image001%25255B3%25255D.png"><img title="clip_image001" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image001" src="https://lh3.googleusercontent.com/-BSM1EXMsWlQ/VxoGNRuEMEI/AAAAAAAAArM/xUHSmS-ryHA/clip_image001_thumb.png?imgmax=800" width="244" height="44"></a> <p>This is not JavaScript and there for I can’t use it. <p>I found an article by Mike Wasson (<a href="http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/action-results">http://www.asp.net/web-api/overview/getting-started-with-aspnet-web-api/action-results</a>). Where he creates a new IHttpActionResult. <p>With this new class. I can control the output. So it will be like this: <p><a href="https://lh3.googleusercontent.com/-85gkauUNWso/VxoGNrVw3gI/AAAAAAAAArQ/d_e3kIfpReQ/s1600-h/clip_image002%25255B3%25255D.png"><img title="clip_image002" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image002" src="https://lh3.googleusercontent.com/-zkrSLLKo9Dc/VxoGNo1rRfI/AAAAAAAAArU/SrrVLXHfzBk/clip_image002_thumb.png?imgmax=800" width="201" height="147"></a>Anders Dissinghttp://www.blogger.com/profile/03197769560151211482noreply@blogger.com0