tag:blogger.com,1999:blog-86251877600267259202019-09-18T08:51:28.738-04:00SharePointBlue - Yet Another SharePoint BlogJust making notes...who can remember all the stuff?Unknown[email protected]Blogger149125tag:blogger.com,1999:blog-8625187760026725920.post-41289426602459257452019-01-05T09:31:00.001-05:002019-01-05T09:31:36.149-05:00Official SharePoint DocumentationI have recently contributed to the official SharePoint documentation for developement. Check it out here:<br /><br /><a href="https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest">https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest</a><br /><br />Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-17175558537731270062018-07-04T11:27:00.000-04:002018-07-04T20:23:49.252-04:00SPFx Docker image on Windows 10 VMPlease follow this GitHub link:<br /><br /><u><span style="color: #000120;"><a href="https://github.com/AlgoNinja/win10docker-spfx">https://github.com/AlgoNinja/win10docker-spfx</a></span></u>Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-72424284786463664042017-12-14T10:03:00.000-05:002017-12-14T10:12:10.585-05:00Knowledge Chat Bot (No Code)Recently my customers was looking for a solution where on-field guys can search for answers related to their tasks and it was a perfect scenario to develop a Chat Bot. Microsoft <a href="https://dev.botframework.com/" target="_blank">Bot Framework</a> has been available for quite some time now and its functionality is keep on getting enhanced with different aspect of Artificial Intelligence like speech recognition, face recognition etc. With yesterday's <a href="https://techcrunch.com/2017/12/13/microsoft-makes-azure-bot-service-generally-available/" target="_blank">announcement</a> of GA of <a href="https://azure.microsoft.com/en-us/services/bot-service/" target="_blank">Azure Bot Services</a>, now we have one place to develop, deploy and expose our intelligent bots to channels like Web, Skype, FB Messenger etc.<br /><br />In this post, I will walk you through Azure Bot Services(<a href="https://docs.microsoft.com/en-us/Bot-Framework">https://docs.microsoft.com/en-us/Bot-Framework</a>) to build and connect a bot but first we need to build our bot's brain and fill it with the knowledge using QnAMaker( <a href="http://qnamaker.ai/">http://qnamaker.ai</a>). <br /><br />This post is divided into following three sections: <br /><ol><li>Architecture</li><li>Building the Knowledge Base (KB)</li><li>Building the Chat Bot</li></ol><b>Note:</b> <i>You need Azure subscription to build this bot</i>.<br /><b><br /></b><b>Architecture </b><br /><hr width="100%" />Following is the architecture of our solution where we will build a service (bot's brain) in QnA Maker and then fill it with our Knowledge Base. Then we will create our bot in Azure Bot Services and link it to the bot's brain (MyBotService) and then we can publish our bot via different channels. We can use Channels to display our bot inside a SharePoint Page, Skype, Teams, Facebook Messenger etc.<br /><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://4.bp.blogspot.com/-k_Rp_pW4UeA/WjKO5-tyETI/AAAAAAAAUoM/zq8udXmU3LYZT2PxNfZ8iY2OpWB5S5hewCLcBGAs/s1600/Architecture.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="695" data-original-width="1365" height="323" src="https://4.bp.blogspot.com/-k_Rp_pW4UeA/WjKO5-tyETI/AAAAAAAAUoM/zq8udXmU3LYZT2PxNfZ8iY2OpWB5S5hewCLcBGAs/s640/Architecture.jpg" width="640" /></a></div><br /><br /><div class="separator" style="clear: both; text-align: center;"></div><b><b>Building the Knowledge Base (KB)</b></b><br /><hr width="100%" /><ol><a href="https://1.bp.blogspot.com/-wY0nJhXu_oM/WjH3utMs76I/AAAAAAAAUmk/R3-ISxekeckTEbDjFG9ZSpk1tSNIVZ5VQCLcBGAs/s1600/02.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://1.bp.blogspot.com/-wyj-H9MtTV4/WjHrV-AhV_I/AAAAAAAAUmU/mUqlLZZEZ54MKCoK4zSokQ5rCRQb46inACLcBGAs/s1600/01.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><li>Log on to QnA Maker at <u><span style="color: #000120;"><a href="https://qnamaker.ai/">https://qnamaker.ai</a></span></u>.</li><li>Select <b>Create New Service</b> tab and provide <b>name</b> of the bot service e.g. <b>MyBotService</b>, leave remaining fields as it is and hit <b>Create</b> button to create the service which will serve as brain of the bot.<br /><a href="https://1.bp.blogspot.com/-wyj-H9MtTV4/WjHrV-AhV_I/AAAAAAAAUmU/mUqlLZZEZ54MKCoK4zSokQ5rCRQb46inACLcBGAs/s1600/01.PNG" imageanchor="1" style="-webkit-text-stroke-width: 0px; background-color: transparent; color: #0066cc; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-left: 16px; margin-right: 16px; orphans: 2; text-align: center; text-decoration: underline; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><img border="0" data-original-height="460" data-original-width="1204" height="243" src="https://1.bp.blogspot.com/-wyj-H9MtTV4/WjHrV-AhV_I/AAAAAAAAUmU/mUqlLZZEZ54MKCoK4zSokQ5rCRQb46inACLcBGAs/s640/01.PNG" width="640" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li><li>You should see the screen where you can provide the knowledge base for your bot. Add couple of questions and their answers by selecting <b>+ Add QnA Pair. </b>Once you add few QnA pairs, hit <b>Save and retrain</b> to train your model. You can also provide the questions and answers in text, pdf and document format.<br /><a href="https://1.bp.blogspot.com/-wY0nJhXu_oM/WjH3utMs76I/AAAAAAAAUmk/R3-ISxekeckTEbDjFG9ZSpk1tSNIVZ5VQCLcBGAs/s1600/02.PNG" imageanchor="1" style="-webkit-text-stroke-width: 0px; background-color: transparent; color: #0066cc; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-left: 16px; margin-right: 16px; orphans: 2; text-align: center; text-decoration: underline; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><img border="0" data-original-height="522" data-original-width="1351" height="246" src="https://1.bp.blogspot.com/-wY0nJhXu_oM/WjH3utMs76I/AAAAAAAAUmk/R3-ISxekeckTEbDjFG9ZSpk1tSNIVZ5VQCLcBGAs/s640/02.PNG" width="640" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li><li>You can select <b>Test</b> tab to test the knowledge base in chat format.</li><li>Hit <b>Publish</b> once testing is done, and then hit <b>publish</b> again on the next screen to publish MyBotService to the web. We will consumed this service through our Bot.</li><li>Once the MyBotService is published, Save the two values highlighted in the screen shot below as <b>QnAKnowledgebaseId</b> and <b>QnASubscriptionKey</b>. We need this information in our Bot's settings.<br /><a href="https://2.bp.blogspot.com/-Z1H6-TO2qJ8/WjKUir5q0oI/AAAAAAAAUoc/_J1NHn25LyUEg9sQi_9rEIQ0uZaxUXtyQCLcBGAs/s1600/04.PNG" imageanchor="1" style="-webkit-text-stroke-width: 0px; background-color: transparent; color: #0066cc; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-left: 16px; margin-right: 16px; orphans: 2; text-align: center; text-decoration: underline; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><img border="0" data-original-height="472" data-original-width="868" height="348" src="https://2.bp.blogspot.com/-Z1H6-TO2qJ8/WjKUir5q0oI/AAAAAAAAUoc/_J1NHn25LyUEg9sQi_9rEIQ0uZaxUXtyQCLcBGAs/s640/04.PNG" width="640" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li></ol><b>Note:</b> You can access further documentation about QnA Maker at <a href="https://qnamaker.ai/Documentation">https://qnamaker.ai/Documentation</a>.<br /><b><br /></b><b>Building the Chat Bot </b><br /><hr width="100%" /><ol><li><span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Log on to Azure at </span><a href="http://portal.azure.com/" style="-webkit-text-stroke-width: 0px; background-color: transparent; color: #0066cc; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: underline; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">http://portal.azure.com</a>.</li><li>Select <b>New</b> and go to <b>AI + Cognitive Services</b> section and choose <b>Web App Bot</b>.<br /><a href="https://1.bp.blogspot.com/-XbI145MbvJE/WjKFaW9o0bI/AAAAAAAAUnc/Nm-G_51tyJYv3M99OAyQACk-3WsG56MiQCLcBGAs/s1600/01.PNG" imageanchor="1" style="-webkit-text-stroke-width: 0px; background-color: transparent; color: #0066cc; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-left: 16px; margin-right: 16px; orphans: 2; text-align: center; text-decoration: underline; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><img border="0" data-original-height="478" data-original-width="807" height="378" src="https://1.bp.blogspot.com/-XbI145MbvJE/WjKFaW9o0bI/AAAAAAAAUnc/Nm-G_51tyJYv3M99OAyQACk-3WsG56MiQCLcBGAs/s640/01.PNG" width="640" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li><li>Provide a unique Bot Name (e.g. DemoBot101), select <b>Subscription</b> and then choose <b>Bot template</b> as <b>Question and Answer</b>. You can also choose between C# or Node.js SDK which doesn't matter in this case as we are not writing any code. Select <b>Create</b> button at the end to create the Bot.<br /><a href="https://2.bp.blogspot.com/-_zZ5kCAnFxM/WjKFaXM8j4I/AAAAAAAAUng/aKXQr4RnMWIiuqiEn7c2OjrUbORlEWg7QCEwYBhgL/s1600/02.PNG" imageanchor="1" style="-webkit-text-stroke-width: 0px; background-color: transparent; color: #0066cc; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-left: 16px; margin-right: 16px; orphans: 2; text-align: center; text-decoration: underline; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><img border="0" data-original-height="874" data-original-width="1130" height="494" src="https://2.bp.blogspot.com/-_zZ5kCAnFxM/WjKFaXM8j4I/AAAAAAAAUng/aKXQr4RnMWIiuqiEn7c2OjrUbORlEWg7QCEwYBhgL/s640/02.PNG" width="640" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li><li>Once the basic bot has been created you will be notified and select <b>Go to resources</b> from the notification section to see the Bot's details, settings etc.<br /><a href="https://4.bp.blogspot.com/-0VDvhlkt5_A/WjKFaeGJ5kI/AAAAAAAAUng/BnwsJu27rzcCOhAJtJ6lYzvFMAw5RE24wCEwYBhgL/s1600/03.PNG" imageanchor="1" style="-webkit-text-stroke-width: 0px; background-color: transparent; color: #0066cc; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-left: 16px; margin-right: 16px; orphans: 2; text-align: center; text-decoration: underline; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><img border="0" data-original-height="247" data-original-width="421" height="233" src="https://4.bp.blogspot.com/-0VDvhlkt5_A/WjKFaeGJ5kI/AAAAAAAAUng/BnwsJu27rzcCOhAJtJ6lYzvFMAw5RE24wCEwYBhgL/s400/03.PNG" width="400" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li><li>Select <b>Application Settings</b> of the bot and go to the <b>App settings</b> section and provide the value of the keys <b>QnAKnowledgebaseId</b><span style="background-color: transparent; color: black; display: inline; float: none; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"> and </span><b>QnASubscriptionKey</b> which we copied while creating the MyBotService and hit <b>Save</b>.<br /><a href="https://1.bp.blogspot.com/-YB2wtu7mre8/WjKJ28d_AZI/AAAAAAAAUns/eGjvgflfmV46Biystn0dkV9cxcWrHBuLgCLcBGAs/s1600/04.PNG" imageanchor="1" style="-webkit-text-stroke-width: 0px; background-color: transparent; color: #0066cc; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-left: 16px; margin-right: 16px; orphans: 2; text-align: center; text-decoration: underline; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><img border="0" data-original-height="732" data-original-width="1193" height="392" src="https://1.bp.blogspot.com/-YB2wtu7mre8/WjKJ28d_AZI/AAAAAAAAUns/eGjvgflfmV46Biystn0dkV9cxcWrHBuLgCLcBGAs/s640/04.PNG" width="640" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li><li>Now you can test the bot from <b>Test in Web Chat</b> tab.<br /><a href="https://3.bp.blogspot.com/-PZDiPhUO7JQ/WjKJ2_BMC2I/AAAAAAAAUno/kJUnMtHFCRExVVODn2QnxyiXoOEt6jPdwCEwYBhgL/s1600/05.PNG" imageanchor="1" style="-webkit-text-stroke-width: 0px; background-color: transparent; color: #0066cc; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-left: 16px; margin-right: 16px; orphans: 2; text-align: center; text-decoration: underline; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><img border="0" data-original-height="808" data-original-width="867" height="372" src="https://3.bp.blogspot.com/-PZDiPhUO7JQ/WjKJ2_BMC2I/AAAAAAAAUno/kJUnMtHFCRExVVODn2QnxyiXoOEt6jPdwCEwYBhgL/s400/05.PNG" width="400" /></a></li><li>Once the testing is completed, this Chat Bot can be published to web, Skype, Teams, MSN Messenger etc via <b>Channels</b>.<br /><a href="https://2.bp.blogspot.com/-1wJjG31KtXc/WjKN44xik3I/AAAAAAAAUoE/zmCraA4fFdMcYodNnvPl7QeENZ6pkP8IgCLcBGAs/s1600/05.PNG" imageanchor="1" style="-webkit-text-stroke-width: 0px; background-color: transparent; color: #0066cc; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; margin-left: 16px; margin-right: 16px; orphans: 2; text-align: center; text-decoration: underline; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><img border="0" data-original-height="838" data-original-width="1268" height="422" src="https://2.bp.blogspot.com/-1wJjG31KtXc/WjKN44xik3I/AAAAAAAAUoE/zmCraA4fFdMcYodNnvPl7QeENZ6pkP8IgCLcBGAs/s640/05.PNG" width="640" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li></ol><i></i><u></u><sub></sub><sup></sup><strike></strike><i></i><u></u><sub></sub><sup></sup><strike></strike><b>Note:</b> You can access Azure Bot Services documentation here: <a href="https://azure.microsoft.com/en-us/services/bot-service">https://azure.microsoft.com/en-us/services/bot-service</a>Unknown[email protected]1tag:blogger.com,1999:blog-8625187760026725920.post-72655024396910673342017-10-18T10:37:00.001-04:002017-10-23T12:01:34.119-04:00Publishing Sites vs Communication SitesIt was <a href="https://techcommunity.microsoft.com/t5/SharePoint-Blog/Reach-your-audience-via-SharePoint-communication-sites-in-Office/ba-p/70079" target="_blank">announced</a> in SharePoint Virtual Summit in May 2017, a more modern way of content publishing is released called Communication Sites. Now you can read all about Communication sites <a href="https://support.office.com/en-us/article/What-is-a-SharePoint-communication-site-94a33429-e580-45c3-a090-5512a8070732" target="_blank">here</a> and <a href="https://en.share-gate.com/blog/sharepoint-online-communication-sites-explained" target="_blank">here</a>, I am going to focus on the major differences between the daddy (<a href="https://support.office.com/en-us/article/Build-a-SharePoint-publishing-site-60B4402C-894A-452C-9DF9-D6546D5172B6" target="_blank">Publishing Sites</a>) and the newborn (Communication Sites) since both are geared towards a similar requirement.....Content Publishing.<br /><br /><b>When NOT to use Publishing & Communication Sites?</b><br />If you have a scenario where few people (generally one or two) are creating content for a larger audience (generally whole organization) then use publishing sites or more recommended communication sites.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://3.bp.blogspot.com/-kxUbYLsumkc/Wbq1qs16q-I/AAAAAAAATec/doIuKyRN2oErlsjH_bvh0P9S-2CUJaZMwCLcBGAs/s1600/Publishing%2Bsite.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="431" data-original-width="324" height="320" src="https://3.bp.blogspot.com/-kxUbYLsumkc/Wbq1qs16q-I/AAAAAAAATec/doIuKyRN2oErlsjH_bvh0P9S-2CUJaZMwCLcBGAs/s320/Publishing%2Bsite.PNG" width="240" /></a></div>If a smaller group is communicating/collaborating among them solves (just like a team would do) then use <a href="https://support.office.com/en-us/article/Create-a-team-site-in-SharePoint-Online-ef10c1e7-15f3-42a3-98aa-b5972711777d" target="_blank">Team Sites</a>. Do not use Publishing Sites or Communication Sites for such scenarios. Its an over kill. Also between small groups the communication is generally two way.<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://4.bp.blogspot.com/-X5KtgW5uWn4/Wbq1q3Tk17I/AAAAAAAATeY/kWO_s3DSoNwz1EIgLkaD5PQijAkfOFlaQCEwYBhgL/s1600/Team%2BSite.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="365" data-original-width="486" height="240" src="https://4.bp.blogspot.com/-X5KtgW5uWn4/Wbq1q3Tk17I/AAAAAAAATeY/kWO_s3DSoNwz1EIgLkaD5PQijAkfOFlaQCEwYBhgL/s320/Team%2BSite.PNG" width="320" /></a></div><br /><b>Publishing Sites vs Communication Sites:</b><br /><br /><table border="1" bordercolor="#0033FF" cellspacing="0" style="width: 600px;"><tbody><tr><th></th><th>Publishing Sites</th><th>Communication Sites</th></tr><tr valign="top"><td>1</td><td valign="top">Not so mobile ready. We have to make use of developers to create master page for mobile and then configure device channels to redirect mobile traffic to different site design.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://4.bp.blogspot.com/-kJGDS3mvOmU/WbrA48VjWiI/AAAAAAAATfM/-6-xfWXX4XEMcktbVejPHEamNCKF-WKGwCLcBGAs/s1600/Pub-2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1107" data-original-width="698" height="320" src="https://4.bp.blogspot.com/-kJGDS3mvOmU/WbrA48VjWiI/AAAAAAAATfM/-6-xfWXX4XEMcktbVejPHEamNCKF-WKGwCLcBGAs/s320/Pub-2.PNG" width="201" /></a></div><br /><br /></td><td valign="top">Mobile ready with responsive design. :o)<br /><br /><br /><br /><a href="https://1.bp.blogspot.com/-uqUos7Iy4hA/WbrA4lu9HHI/AAAAAAAATfI/hd0_iMmvV-EAJV91XNmn2KPGW5nF0iyEQCLcBGAs/s1600/Com-2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1143" data-original-width="697" height="320" src="https://1.bp.blogspot.com/-uqUos7Iy4hA/WbrA4lu9HHI/AAAAAAAATfI/hd0_iMmvV-EAJV91XNmn2KPGW5nF0iyEQCLcBGAs/s320/Com-2.PNG" style="cursor: move;" width="195" /></a><br /><b><br /></b></td></tr><tr><td valign="top">2</td><td valign="top">More development work to setup a complete solution as developer's involvement is needed for developing custom Master Pages, writing HTML/CSS, designing Page Layouts with SharePoint Designer.<br /><br /></td><td valign="top"><a href="https://1.bp.blogspot.com/-uqUos7Iy4hA/WbrA4lu9HHI/AAAAAAAATfI/hd0_iMmvV-EAJV91XNmn2KPGW5nF0iyEQCLcBGAs/s1600/Com-2.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a>Developer's involvement is not required for common requirements like responsive UI, Page Layouts with multiple columns, light weight web parts (e.g. Hero web part).<br /><br /></td></tr><tr><td valign="top">3</td><td valign="top"><a href="https://3.bp.blogspot.com/-PO9_FwbMRtU/Wbq_hANYiBI/AAAAAAAATe8/wk20zSHhQH46FeEvCyKH3sGi3cxzQ9GKQCLcBGAs/s1600/Pub-1.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a>Not so modern UI even with HTML5. Very SharePoint type look an feel.<br /><br /><a href="https://1.bp.blogspot.com/-0XkGmsNN5po/Wbq_gudXK5I/AAAAAAAATe4/0SyW6nwlcEoOC7ArCfHS1VSnIwNSaG80wCLcBGAs/s1600/Com-1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="815" data-original-width="1600" height="161" src="https://1.bp.blogspot.com/-0XkGmsNN5po/Wbq_gudXK5I/AAAAAAAATe4/0SyW6nwlcEoOC7ArCfHS1VSnIwNSaG80wCLcBGAs/s320/Com-1.PNG" width="320" /></a><br /><br /></td><td valign="top">Modern UI.<br /><br /><br /><a href="https://3.bp.blogspot.com/-PO9_FwbMRtU/Wbq_hANYiBI/AAAAAAAATe8/wk20zSHhQH46FeEvCyKH3sGi3cxzQ9GKQCLcBGAs/s1600/Pub-1.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="846" data-original-width="1600" height="168" src="https://3.bp.blogspot.com/-PO9_FwbMRtU/Wbq_hANYiBI/AAAAAAAATe8/wk20zSHhQH46FeEvCyKH3sGi3cxzQ9GKQCLcBGAs/s320/Pub-1.PNG" width="320" /></a><br /><b><br /></b></td></tr><tr><td valign="top">4</td><td valign="top">Publishing a page needs more steps like check-out, , save, check-in, publish.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://3.bp.blogspot.com/-X-ySlMLi8kc/Wbq-yU9N4VI/AAAAAAAATes/AmIjwLmHNWcLnONDTcnRRXv77iTs99phQCLcBGAs/s1600/PS-Pub.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="302" data-original-width="333" height="181" src="https://3.bp.blogspot.com/-X-ySlMLi8kc/Wbq-yU9N4VI/AAAAAAAATes/AmIjwLmHNWcLnONDTcnRRXv77iTs99phQCLcBGAs/s200/PS-Pub.PNG" width="200" /></a></div></td><td valign="top"><a href="https://2.bp.blogspot.com/-E5b06F7jFWU/Wbq-ybFhXYI/AAAAAAAATew/fmlS_HmiK3IzQ04GpY_GPqvvJgJGbA9kgCLcBGAs/s1600/PS-Com.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a>One step publishing. Just click publishing.<br /><br /><a href="https://2.bp.blogspot.com/-E5b06F7jFWU/Wbq-ybFhXYI/AAAAAAAATew/fmlS_HmiK3IzQ04GpY_GPqvvJgJGbA9kgCLcBGAs/s1600/PS-Com.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="76" data-original-width="313" height="48" src="https://2.bp.blogspot.com/-E5b06F7jFWU/Wbq-ybFhXYI/AAAAAAAATew/fmlS_HmiK3IzQ04GpY_GPqvvJgJGbA9kgCLcBGAs/s200/PS-Com.PNG" width="200" /></a></td></tr></tbody></table><br /><b>Conclusion:</b><b></b><br />Now that we have learned the major differences between the both site types, here is what we should do in order to choose between them.<br /><br />We should start designing publishing solutions with Communication sites in mind. It gives many features OOB which have been requested by customer again and again, specially the responsive UI. It is quicker to create content, faster to publish and cleaner to manage Communication sites without any developer's involvement. At this point it does not have features like cross-site publishing, Approval workflow, multi language etc but many(not all) of these features are in pipeline as told in <a href="https://techcommunity.microsoft.com/t5/Communications-Sites-AMA/bd-p/CommunicationsSitesAMA" target="_blank">community forum</a> :o).<br /><br /><b>Note:</b> Publishing Sites are not deprecated at this point.<br /><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br />On the other hand Publishing Site have more functionality at this point and gives you more control over branding as you can introduce your own HTML/CSS and can write custom MasterPages. But this great functionality comes at the cost of custom code and developer's involvement which can result in higher cost for publishing.<br /><br />Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-28826514673425622262017-06-12T10:57:00.000-04:002017-06-12T10:57:57.190-04:00Microsoft Flow - HTTP REST CallIn this blog post, I will cover what is a workflow and how we can create a workflow using Microsoft Flow that can make HTTP REST calls to bring the stock price and then I will discuss how we can use this workflow in a iPhone app in following sections:<br /><ol><li><span style="color: #3d85c6;">Workflow</span></li><li><span style="color: #3d85c6;">Microsoft Flow</span></li><li><span style="color: #3d85c6;">HTTP REST Call from MS Flow</span></li><li><span style="color: #3d85c6;">Using the Workflow in the Flow App</span></li></ol><b>Workflow:</b><br />My definition of a workflow is, <i><b>steps to complete a task</b></i>. That's it :o). <br />For example, if you want to get your driving license then you follow the steps provided on the DMV's site (1-Bring documents, 2-Fill paper work, 3-Get your photo taken, 4-Pay fee). In this example, our task is to get the driving license and in order to complete this task we have to follow four steps.<br /><b></b><br /><div id="flow"><b>Microsoft Flow:</b></div>In SharePoint world we used to have <a href="https://en.wikipedia.org/wiki/Microsoft_SharePoint_Designer">SharePoint Designer</a> (which we all love) to create workflows and do other stuff. Now that there is not going to be a newer version of SPD, Microsoft has provided another awesome way of creating workflows called <a href="https://flow.microsoft.com/" target="_blank">Microsoft Flow</a>. Its a cloud based service which lives outside the SharePoint world, can be used on a mobile phone and can interact with many services like SPO list/lib, Outlook, Azure, Salesforce, Twitter, Google Drive, Gmail and the list goes on and on. Microsoft Flow is a no-code/low-code solution and it can also interact with SharePoint on-prem. <br /><br />So without further due lets create a workflow which will make HTTP REST call to grab stock quote of a provided ticker....and we will be using this workflow in our iPhone.<br /><br /><div id="dev"><b>HTTP REST Call from MS Flow:</b></div><ol><a href="https://3.bp.blogspot.com/-MSm5Jmvo4Uc/WTlpgJ9KrwI/AAAAAAAASk4/a1Df_TyjMHkR8oqJx2oNK0jyhH_Kk4VlgCEw/s1600/04.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><li>Go to <a href="https://flow.microsoft.com/" target="_blank">Microsoft Flow</a>, sign-in and create an empty flow "Stock Price".</li><li>Now I am going to add steps to trigger the workflow manually which will make an HTTP REST call and then parse the results and show me the price in a mobile notification.</li><li>For that my workflow will have following steps: An input button, HTTP Request step, Compose step, Parse JSON step and then Mobile Notification step as shown in the diagram below:<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-tuuHc4Dz8H4/WTlpgAMbAcI/AAAAAAAASk4/Pg_Gj2D44c4wJWAW_1ZvJCKUx3fzDrPmACEw/s1600/03.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><a href="https://1.bp.blogspot.com/-1Zu_hwRC8Kk/WTlm0NhtQyI/AAAAAAAASkY/UDEncVZcSTY6c0QVjeTmkyUxqdHeYNrCgCLcB/s1600/01.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1130" data-original-width="1477" height="305" src="https://1.bp.blogspot.com/-1Zu_hwRC8Kk/WTlm0NhtQyI/AAAAAAAASkY/UDEncVZcSTY6c0QVjeTmkyUxqdHeYNrCgCLcB/s400/01.PNG" width="400" /></a></div></li><li>Manually trigger a workflow step adds a button on your iPhone app which takes a stock ticker input. You have to install the Flow app from the App Store in order to view it.<br /><a href="https://1.bp.blogspot.com/-dmmAGkecS6U/WTlpV4E3oSI/AAAAAAAASkk/xKDZlWuEL6MNvjf-jJIeH2CbDyydttK4QCEw/s1600/02.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="492" data-original-width="908" height="173" src="https://1.bp.blogspot.com/-dmmAGkecS6U/WTlpV4E3oSI/AAAAAAAASkk/xKDZlWuEL6MNvjf-jJIeH2CbDyydttK4QCEw/s320/02.PNG" width="320" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li><li>HTTP step will make REST call to google finance API via GET method by providing the stock ticker taken in the previous step. e.g. <span style="font-family: "courier new" , "courier" , monospace;"><b>http://finance.google.com/finance/info?client=ig&q=MSFT</b></span><i></i><br /><a href="https://1.bp.blogspot.com/-tuuHc4Dz8H4/WTlpgAMbAcI/AAAAAAAASk4/Pg_Gj2D44c4wJWAW_1ZvJCKUx3fzDrPmACEw/s1600/03.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="363" data-original-width="912" height="158" src="https://1.bp.blogspot.com/-tuuHc4Dz8H4/WTlpgAMbAcI/AAAAAAAASk4/Pg_Gj2D44c4wJWAW_1ZvJCKUx3fzDrPmACEw/s400/03.PNG" width="400" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li><li>As a result we will get JSON response. I added Compose step to strip out the special characters in the response by using a WDL(<a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language" target="_blank">Workflow Definition Language</a>) function: <span style="font-family: "courier new" , "courier" , monospace;">"</span><b><span style="font-family: "courier new" , "courier" , monospace;">@replace(body('HTTP'), '// ', '')"</span></b>.<br /><a href="https://3.bp.blogspot.com/-MSm5Jmvo4Uc/WTlpgJ9KrwI/AAAAAAAASk4/a1Df_TyjMHkR8oqJx2oNK0jyhH_Kk4VlgCEw/s1600/04.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="154" data-original-width="919" height="66" src="https://3.bp.blogspot.com/-MSm5Jmvo4Uc/WTlpgJ9KrwI/AAAAAAAASk4/a1Df_TyjMHkR8oqJx2oNK0jyhH_Kk4VlgCEw/s400/04.PNG" width="400" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li><li>After removing the special characters I should be able to parse JSON by providing a valid schema. You can generate schema by adding your response to the blue link provided at the bottom of this step.<br /><a href="https://4.bp.blogspot.com/-sIxYfKshT7M/WTlpgKv9FKI/AAAAAAAASk4/KepaNweFnsgF6_mvUfFF7kOIR3iBs6uaACEw/s1600/05.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="499" data-original-width="921" height="173" src="https://4.bp.blogspot.com/-sIxYfKshT7M/WTlpgKv9FKI/AAAAAAAASk4/KepaNweFnsgF6_mvUfFF7kOIR3iBs6uaACEw/s320/05.PNG" style="cursor: move;" width="320" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li><li>Now lets add the notification step and add <b>Ticker</b> and <b>l</b> outputs to the Text field of this step. Note that notification step will be placed inside the loop automatically as JSON response can have multiple results for <b>l</b>.<br /><a href="https://3.bp.blogspot.com/-OD9adC-8reY/WTlpgaeZhxI/AAAAAAAASk4/oJo3WN8lN98rFuw2HtzcWluTFM3d0fSuwCEw/s1600/06.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="488" data-original-width="966" height="161" src="https://3.bp.blogspot.com/-OD9adC-8reY/WTlpgaeZhxI/AAAAAAAASk4/oJo3WN8lN98rFuw2HtzcWluTFM3d0fSuwCEw/s320/06.PNG" width="320" /></a></li></ol><div id="demo"><b>Using the Workflow in the Flow App</b></div><ol><li>Install the Flow app from App Store in your iPhone.</li><li>Sign-in and go to the <b>Buttons</b>. You should be able to see all your buttons there.</li><li>Click "Stock Price" button and provide the symbol <b>MSFT</b> and then hit <b>Done</b>.<br /><a href="https://1.bp.blogspot.com/-s2H8pm-KVXg/WTl2UhqVAFI/AAAAAAAASlE/-upTGTzGuVElbmiDraXOOJD5Otx_AOQ9ACLcB/s1600/20170608_154244000_iOS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1136" data-original-width="640" height="320" src="https://1.bp.blogspot.com/-s2H8pm-KVXg/WTl2UhqVAFI/AAAAAAAASlE/-upTGTzGuVElbmiDraXOOJD5Otx_AOQ9ACLcB/s320/20170608_154244000_iOS.png" width="179" /></a><a href="https://3.bp.blogspot.com/-30T82t98ips/WTl2UoxjWeI/AAAAAAAASlI/rvBakRgTuGAxZHx7d40yqrolbLbq5J3nACLcB/s1600/20170608_154300000_iOS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1136" data-original-width="640" height="320" src="https://3.bp.blogspot.com/-30T82t98ips/WTl2UoxjWeI/AAAAAAAASlI/rvBakRgTuGAxZHx7d40yqrolbLbq5J3nACLcB/s320/20170608_154300000_iOS.png" width="179" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li><li>This will start the workflow and you should get the push notification with the stock ticker with the price quote in it.<br /> <div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-kbJdAboHeY0/WTl2U-8QYEI/AAAAAAAASlQ/nbZpTzTm5N4AgwRUsbKpTYRPKhBtvVPjwCEw/s1600/20170608_155840000_iOS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1136" data-original-width="640" height="320" src="https://1.bp.blogspot.com/-kbJdAboHeY0/WTl2U-8QYEI/AAAAAAAASlQ/nbZpTzTm5N4AgwRUsbKpTYRPKhBtvVPjwCEw/s320/20170608_155840000_iOS.png" width="180" /></a></div></li></ol>Ref: <a href="https://flow.microsoft.com/">https://flow.microsoft.com</a><br />Ref: <a href="https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language">https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language</a><br /><br />Unknown[email protected]1tag:blogger.com,1999:blog-8625187760026725920.post-3808826061168199172017-05-25T15:22:00.000-04:002017-05-25T16:09:17.677-04:00SharePoint Online Page Load Time with JavaScript<span style="font-family: "arial" , "helvetica" , sans-serif;"><b>Scenario:</b></span><br /><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">We know that Microsoft don't recommend any kind of load testing against SharePoint Online pages as mentioned </span><a href="https://support.office.com/en-us/article/Capacity-planning-and-load-testing-SharePoint-Online-c932bd9b-fb9a-47ab-a330-6979d03688c0"><span style="font-family: "arial" , "helvetica" , sans-serif;">here</span></a><span style="font-family: "arial" , "helvetica" , sans-serif;"> but still customers want to know how much time it takes to load a page to get a feel of the end user experience. </span></span><br /><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span><span style="font-family: "arial" , "helvetica" , sans-serif;"><b>Solution:</b></span><br /><span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-family: "arial" , "helvetica" , sans-serif;">To find the page load times, browsers (Edge, Chrome & Firefox) now have built-in support of </span><a href="http://www.w3.org/TR/navigation-timing/" target="_blank"><span style="font-family: "arial" , "helvetica" , sans-serif;">Navigation Timing</span></a><span style="font-family: "arial" , "helvetica" , sans-serif;"> which is a JavaScript API to measure the performance of a web page. This API is exposed via </span><b><span style="font-family: "arial" , "helvetica" , sans-serif;">performance.timing</span></b><span style="font-family: "arial" , "helvetica" , sans-serif;"> object. Performance Timing API provides following events of for a web page, which we can use in JavaScript to get the different times of page load:</span></span><br /><span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://3.bp.blogspot.com/-I3-3GCUCQeY/WScmnOa9MAI/AAAAAAAAQNc/psb5YKjblZ0LLfzuyMrBziYtlt8oTBKrQCLcB/s1600/Performance-timing.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><img border="0" height="382" src="https://3.bp.blogspot.com/-I3-3GCUCQeY/WScmnOa9MAI/AAAAAAAAQNc/psb5YKjblZ0LLfzuyMrBziYtlt8oTBKrQCLcB/s640/Performance-timing.png" width="640" /></span></a></div><span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br /><div><span style="font-family: "arial";"><span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br /></span></div><div><span style="font-family: "arial" , "helvetica" , sans-serif;">Here is an example of JavaScript that calculates the complete page load time, starting from the user pressing the Go button in the browser till the page renders completely:</span><span style="font-family: "arial";"><span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br /></span></div><pre style="background-color: #eeeeee; border-image: none; border: 1px dashed rgb(153, 153, 153); color: black; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><span style="font-family: "arial" , "helvetica" , sans-serif;">Load Time: <div id="LoadTime"> </div><br /><br /><script type="text/javascript" ><br /><br />window.onload = function(){<br /> setTimeout(function(){<br /> var t = performance.timing;<br /> document.getElementById('LoadTime').innerHTML = t.loadEventEnd - t.navigationStart;<br /> }, 0);<br />}<br /><br /></script><br /></span></code></pre><div><span style="font-family: "arial";"><span style="font-family: "arial" , "helvetica" , sans-serif;">Note that above script is calculating difference between </span><b><span style="font-family: "arial" , "helvetica" , sans-serif;">loadEvendEnd</span></b><span style="font-family: "arial" , "helvetica" , sans-serif;"> (very last event) and </span><b><span style="font-family: "arial" , "helvetica" , sans-serif;">navigationStart</span></b><span style="font-family: "arial" , "helvetica" , sans-serif;"> (very first event) which is simulating the end user experience. The time will be displayed in milliseconds.</span><span style="font-family: "arial" , "helvetica" , sans-serif;"></span> </span><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-VMFuvBnwa1M/WScwLI-zCYI/AAAAAAAAQNw/9wdrXwHZULsI7RZTDwpk5EV3rkSFmAjFgCLcB/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://1.bp.blogspot.com/-VMFuvBnwa1M/WScwLI-zCYI/AAAAAAAAQNw/9wdrXwHZULsI7RZTDwpk5EV3rkSFmAjFgCLcB/s400/Capture.PNG" width="400" /></a></div><br /><br /><span style="font-family: "arial";"><span style="font-family: "arial" , "helvetica" , sans-serif;">Similarly we can calculate the time between the request sent to server and response that came back from the server by calculating the difference between </span><b><span style="font-family: "arial" , "helvetica" , sans-serif;">responseEnd</span></b><span style="font-family: "arial" , "helvetica" , sans-serif;"> and </span><b><span style="font-family: "arial" , "helvetica" , sans-serif;">requestStart</span></b><span style="font-family: "arial" , "helvetica" , sans-serif;"> events. </span></span></div><div><span style="font-family: "arial";"><span style="font-family: "arial" , "helvetica" , sans-serif;"></span><br /></span></div><div><span style="font-family: "arial";"><span style="font-family: "arial" , "helvetica" , sans-serif;">Reference: </span><a href="https://docs.microsoft.com/en-us/microsoft-edge/dev-guide/performance/navigation-timing-api"><span style="font-family: "arial" , "helvetica" , sans-serif;">https://docs.microsoft.com/en-us/microsoft-edge/dev-guide/performance/navigation-timing-api </span></a></span></div>Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-67973997832939804672016-11-01T21:48:00.000-04:002016-11-01T21:48:10.472-04:00Microsoft Graph vs Office GraphMicrosoft introduced <a href="https://dev.office.com/officegraph">Office Graph</a> a couple of months back which uses machine learning techniques to connect people to the relevant content, conversations and other people around them in Microsoft Cloud (Office 365). Now Microsoft recently introduced <a href="https://graph.microsoft.io/en-us/">Microsoft Graph</a>, which is a unified API endpoint, for accessing data, intelligence, and insights in the Microsoft cloud...and everybody is now confused :o). In this post I will try to explain the difference.<br /><br /><b>What is Graph?</b><br />According to wikipedia graph also known as social graph is described as: <br /><i>The <b>social graph</b> in the Internet context is a graph that depicts personal relations of internet users. In short, it is model or representation of a social network, where the word graph has been taken from graph theory to emphasize that rigorous mathematical analysis will be applied as opposed to the relational representation in a social network.</i><br /><br />Which means that how a person on internet is related or linked to another person and/or object(like document, image etc).This term was popularized by Facebook...for obvious reasons :o).<br /><br /><b>Office Graph:</b><br />The Office Graph uses machine learning algorithms to learn how a Office 365 user is connected to other users, content(documents etc) and conversations in a tenant and create a graph based on it in order to make suggestions. <br /><br />If you go to Delve, the yellow section shows the information generated automatically based on Office Graph:<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://3.bp.blogspot.com/-0-GBx9KcMFI/WBihZ_lhRII/AAAAAAAAOBU/bf0u6aZARHsoTHaSOhGFUIZJ0nqiLC1dACLcB/s1600/1%2BDelve%2Bwith%2BGraph.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="364" src="https://3.bp.blogspot.com/-0-GBx9KcMFI/WBihZ_lhRII/AAAAAAAAOBU/bf0u6aZARHsoTHaSOhGFUIZJ0nqiLC1dACLcB/s640/1%2BDelve%2Bwith%2BGraph.PNG" width="640" /></a></div><br />If we disable office graph by going into the SharePoint settings:<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://2.bp.blogspot.com/-8bADiGiqcMc/WBihlRPunpI/AAAAAAAAOBY/WEIf-4gfBzQzDR3ohGgwOnmCQggbKI2jgCLcB/s1600/Office%2BGraph%2BSettings.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="51" src="https://2.bp.blogspot.com/-8bADiGiqcMc/WBihlRPunpI/AAAAAAAAOBY/WEIf-4gfBzQzDR3ohGgwOnmCQggbKI2jgCLcB/s400/Office%2BGraph%2BSettings.PNG" width="400" /></a></div>then Delve will not show the information generated by the office graph, it will only show basic about me information:<br /><div class="separator" style="clear: both; text-align: center;"><a href="https://3.bp.blogspot.com/-1LxXIxqFh98/WBih2jxd-SI/AAAAAAAAOBc/BMkstsHZzP8RdwMvbauwGbYy67e6FGOFACLcB/s1600/Delve%2Bwithout%2BGraph.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://3.bp.blogspot.com/-1LxXIxqFh98/WBih2jxd-SI/AAAAAAAAOBc/BMkstsHZzP8RdwMvbauwGbYy67e6FGOFACLcB/s640/Delve%2Bwithout%2BGraph.PNG" width="640" /></a></div><br /><b>Microsoft Graph:</b><br />Microsoft Graph is an API with a single end point to access data, intelligence and insights from Microsoft Cloud (Office 365). <br /><div class="separator" style="clear: both; text-align: center;"><a href="https://4.bp.blogspot.com/-PXevKmxvoug/WBiwBrDwx8I/AAAAAAAAOBs/lPigjYYsKGIV-07lpl1XoJ1NCT2SYShVACLcB/s1600/MS%2BGrap%2BAPI.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="144" src="https://4.bp.blogspot.com/-PXevKmxvoug/WBiwBrDwx8I/AAAAAAAAOBs/lPigjYYsKGIV-07lpl1XoJ1NCT2SYShVACLcB/s640/MS%2BGrap%2BAPI.png" width="640" /></a></div><br />Let's understand it by an example, imagine a scenario where an app has to access a user's email attachment, upload it to SharePoint and then notify user's manager. Now that app needs to get authenticated first and then go to Outlook to grab emails and then go to SharePoint to upload files, which means dev have to have to work with three different set of APIs (Active Directory, Outlook and SharePoint). To overcome such scenarios Microsoft has introduced one API (Graph API) to talk to all Office 365 products. Microsoft Graph API is one API to rule them all.<br /><br /><b>Access Office Graph via MS Graph: </b>Microsoft Graph API does not depend on Office Graph. However it can provides more functionality when Office Graph is enabled e.g. trends and related people etc. Click <a href="https://msdn.microsoft.com/en-us/office/office365/howto/query-Office-graph-using-gql-with-search-rest-api">here</a> to learn more.<br /><br /><b>Note:</b> For SharePoint developers: MS Graph API is not here to kill CSOM and SharePoint REST API.<br /><br />MS Graph API calls can be tested before writing the app with Graph Explorer: <a href="https://graph.microsoft.io/en-us/graph-explorer">https://graph.microsoft.io/en-us/graph-explorer</a><br /><a href="https://4.bp.blogspot.com/-3ftjr8-UJHA/WBiyR3DcULI/AAAAAAAAOB4/kVyd1sYhcLkniEmtEKju8pfccQfJiFBawCLcB/s1600/Graph%2BExplorer.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="456" src="https://4.bp.blogspot.com/-3ftjr8-UJHA/WBiyR3DcULI/AAAAAAAAOB4/kVyd1sYhcLkniEmtEKju8pfccQfJiFBawCLcB/s640/Graph%2BExplorer.PNG" width="640" /></a><br />Ref: <a href="https://en.wikipedia.org/wiki/Social_graph">https://en.wikipedia.org/wiki/Social_graph</a><br />Ref: <a href="https://dev.office.com/officegraph">https://dev.office.com/officegraph</a><br />Ref: <a href="https://graph.microsoft.io/">https://graph.microsoft.io</a>Unknown[email protected]6tag:blogger.com,1999:blog-8625187760026725920.post-76202550673972534862016-10-25T23:11:00.001-04:002016-10-25T23:11:53.781-04:00Office365 Subsite Logo Redirection<b>Scenario:</b><br />Sub-site logo points to the sub-site's home page by default...and the requirement is to point it to the top level site's.<br /><br /><b>Solution:</b><br />We can not change Master Page in Office365/SharePoint Online site so we need to <a href="http://www.sharepointblue.com/2016/03/sharepoint-online-javascript-injection.html">embed/inject</a> the following JavaScript:<br /><br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: "andale mono" , "lucida console" , "monaco" , "fixed" , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><br /><br /><script language="javascript" type="text/javascript"><br /><br />$(document).ready(function () {<br /><br /> $('#ctl00_onetidProjectPropertyTitleGraphic').attr('href','/sites/Portal');<br /> $('#ctl00_onetidProjectPropertyTitleGraphic').removeAttr('id');<br /><br />});<br /><br /></script><br /><br /></code></pre>Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-2285518638091111722016-09-13T23:28:00.000-04:002016-09-13T23:28:58.807-04:00PowerShell Script Analyzer<i>"PSScriptAnalyzer is a static code checker for Windows PowerShell modules and scripts. PSScriptAnalyzer checks the quality of Windows PowerShell code by running a set of rules. The rules are based on PowerShell best practices identified by PowerShell Team and the community. It generates DiagnosticResults (errors and warnings) to inform users about potential code defects and suggests possible solutions for improvements.</i>"<br />Ref: <a href="https://github.com/PowerShell/PSScriptAnalyzer">https://github.com/PowerShell/PSScriptAnalyzer</a><br /><br />Lets put this to the test. I have written following basic PowerShell Script in Visual Studio Code (because it is an awesome tool and it has a PowerShell extension that give you features like IntelliSense, Goto definition, Debugging etc) and will be running the Script Analyzer on the script file. In this script I am calling a function that will display a string stored in a variable.<br /><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://4.bp.blogspot.com/-DqZyD9vWgzg/V9hWFNc1e2I/AAAAAAAANKQ/BGe26RroTAAe7WevExiD41RdQECznRsCwCLcB/s1600/01.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="190" src="https://4.bp.blogspot.com/-DqZyD9vWgzg/V9hWFNc1e2I/AAAAAAAANKQ/BGe26RroTAAe7WevExiD41RdQECznRsCwCLcB/s320/01.PNG" width="320" /></a></div><br />Open the Windows PowerShell Console and lets install the PSScriptAnalyzer module (This module is available in v 5.0 and above by default):<br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: "andale mono" , "lucida console" , "monaco" , "fixed" , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>Install-Module -Name PSScriptAnalyzer -Force<br /></code></pre><br />Verify if the commands are available for this module:<br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: "andale mono" , "lucida console" , "monaco" , "fixed" , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>Get-Command -Module PSScriptAnalyzer<br /></code></pre><a href="https://2.bp.blogspot.com/-rmlNFje1aJ8/V9hVh4skjzI/AAAAAAAANKM/u9MpRIRKhPUz4KVwZMAFvTAXz9FGRyPTACLcB/s1600/02.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="80" src="https://2.bp.blogspot.com/-rmlNFje1aJ8/V9hVh4skjzI/AAAAAAAANKM/u9MpRIRKhPUz4KVwZMAFvTAXz9FGRyPTACLcB/s640/02.PNG" width="640" /></a><br /><br />Run the Script Analyzer on our test script:<br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: "andale mono" , "lucida console" , "monaco" , "fixed" , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>Invoke-ScriptAnalyzer -Path C:\Users\user1\Desktop\Test.ps1<br /></code></pre><a href="https://4.bp.blogspot.com/-G-P1l9oTVN0/V9hXADhbSHI/AAAAAAAANKY/-H6rTHn-HEUC4pOzv-Z7Wqh3DIuW03Q6wCLcB/s1600/03.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="98" src="https://4.bp.blogspot.com/-G-P1l9oTVN0/V9hXADhbSHI/AAAAAAAANKY/-H6rTHn-HEUC4pOzv-Z7Wqh3DIuW03Q6wCLcB/s640/03.PNG" width="640" /></a><br /><br />Now the ScriptAnalyzer is showing me one warning in my most simplest script that Write-Host (which I have been using my whole life) is obsolete and use Write-Output instead.....which is awesome :o). And that's how easily we can do static analysis based on the built-in rules on our PowerSell scripts.<br /><br />To get the complete list of rules, use the following command:<br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: "andale mono" , "lucida console" , "monaco" , "fixed" , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>Get-ScriptAnalyzerRule<br /></code></pre>Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-64950895526164149442016-06-12T15:22:00.001-04:002016-06-12T18:40:49.243-04:00SharePoint DSCSharePoint DesierState Configuration has Ben released.<br /><br />Url: <a href="https://github.com/PowerShell/SharePointDsc">https://github.com/PowerShell/SharePointDsc</a><br /><br />While in pre-release mode it was called xSharePoint.Unknown[email protected]5tag:blogger.com,1999:blog-8625187760026725920.post-51250260651476408232016-03-10T12:18:00.001-05:002016-03-10T12:40:03.590-05:00SharePoint Online - JavaScript Injection with PowerShell<b>Scenario:</b><br />Updating the Master Page for SharePoint Online is not recommended by Microsoft now.....fine. So how do we change the UI then? And the answer is...by injecting JavaScript and CSS.<br /><br /><b>Solution:</b><br />You might want to watch <a href="https://channel9.msdn.com/Blogs/Office-365-Dev/JavaScript-injection-in-SharePoint-Online-Office-365-Developer-Patterns-and-Practices">this video</a> of JavaScript injection which we will not follow here as injecting JavaScript and/or CSS through Visual Studio takes little bit of time as shown in the above video so I am putting pieces together to inject JavaScript using PowerShell very very...very quickly. Thank you Office Dev PnP's <a href="https://github.com/erwinvanhunen">Erwin van Hunen</a>.<br /><br /><b>Note:</b> We are not going to use SharePoint Online Management Shell ;o) instead we will use Windows PowerShell.<br /><ol><li>Install PnP PowerShell Cmdlets for SharePoint Online<br />Url: <a href="https://github.com/officedev/pnp-powershell/releases">https://github.com/officedev/pnp-powershell/releases</a></li><a href="https://3.bp.blogspot.com/-6YW0p9tHkuE/VuGi-0kwchI/AAAAAAAAISA/PNVsNvZb2KI/s1600/02.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://3.bp.blogspot.com/-IFFuuQ_N55A/VuGiwaCNMJI/AAAAAAAAIR4/FHe2m19QJu0/s1600/01.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://2.bp.blogspot.com/-6YW0p9tHkuE/VuGi-0kwchI/AAAAAAAAIR0/7C5Tcu4Bor0/s1600/02.PNG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a><li>Perform a quick test: Run the command below in Windows PowerShell to see if it is available<br /><span style="font-family: "courier new" , "courier" , monospace;"> Get-Command Add-SPOJavaScriptBlock<b><br /></b><a href="https://3.bp.blogspot.com/-IFFuuQ_N55A/VuGiwaCNMJI/AAAAAAAAIR4/FHe2m19QJu0/s1600/01.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="108" src="https://3.bp.blogspot.com/-IFFuuQ_N55A/VuGiwaCNMJI/AAAAAAAAIR4/FHe2m19QJu0/s640/01.PNG" width="640" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></span></li><li>Connect to the site where you want to push JavaScript code:<br /><span style="font-family: "courier new" , "courier" , monospace;">Connect-SPOnline https://tenant.sharepoint.com/sites/portal<b><br /></b><a href="https://3.bp.blogspot.com/-6YW0p9tHkuE/VuGi-0kwchI/AAAAAAAAISA/PNVsNvZb2KI/s1600/02.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://3.bp.blogspot.com/-6YW0p9tHkuE/VuGi-0kwchI/AAAAAAAAISA/PNVsNvZb2KI/s1600/02.PNG" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></span></li><li>Push the JavaScript code.<br /><span style="font-family: "courier new" , "courier" , monospace;">Add-SPOJavaScriptBlock -Name MyScript -Script "alert('Hello World');"<br /><span style="font-family: inherit;">or</span><b><br /></b>Add-SPOJavaScriptLink -Name JQuery -Url https://code.jquery.com/jquery.min.js<b><br /></b><a href="https://2.bp.blogspot.com/-az15a5r5h64/VuGntbVhrSI/AAAAAAAAISY/6cTBn7RAXkU/s1600/05.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="42" src="https://2.bp.blogspot.com/-az15a5r5h64/VuGntbVhrSI/AAAAAAAAISY/6cTBn7RAXkU/s640/05.PNG" width="640" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></span></li><li>You are done. Now browse the site and you will get the annoying Hello World alert on all the pages.<br /><a href="https://2.bp.blogspot.com/-ASG7zUpnEAU/VuGkIPt5fFI/AAAAAAAAISI/GdfmAGd8hVY/s1600/03.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="233" src="https://2.bp.blogspot.com/-ASG7zUpnEAU/VuGkIPt5fFI/AAAAAAAAISI/GdfmAGd8hVY/s320/03.PNG" width="320" /></a><a href="https://3.bp.blogspot.com/-LoU-z5p0kl4/VuGkIGScXpI/AAAAAAAAISE/8VWLvBmeQV8/s1600/04.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="231" src="https://3.bp.blogspot.com/-LoU-z5p0kl4/VuGkIGScXpI/AAAAAAAAISE/8VWLvBmeQV8/s320/04.PNG" width="320" /></a><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike></li></ol>Here is the complete script:<br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: "andale mono" , "lucida console" , "monaco" , "fixed" , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>#<br /># This is a sample script and is provided as is.<br /># Author: Tahir Naveed<br /># Description: This script connects to a SPO site and <br /># injects a JavaScript code block which will execute on all of the pages.<br />#<br />#<br /><br />$url = "https://tenant.sharepoint.com/sites/portal"<br />$ScriptName = "MyScript"<br />$scriptBlock = "alert('Hello World');"<br /><br />try<br />{<br /> #Connect to the SPO site<br /> Connect-SPOnline $url<br /> <br /> #Remove script if added before<br /> Remove-SPOJavaScriptLink -Name $ScriptName<br /><br /> #Add the script<br /> Add-SPOJavaScriptBlock -Name $ScriptName -Script $scriptBlock<br /><br />}<br />catch<br />{<br /> Write-Host "$_.Exception.Message"<br />}<br /><br />Write-Host "Completed successfully." -ForegroundColor Green<br /></code></pre>Ref: <a href="https://channel9.msdn.com/blogs/OfficeDevPnP/Introduction-to-PnP-PowerShell-Cmdlets">Introduction to PnP PowerShell Cmdlets</a><br />Ref: <a href="https://github.com/OfficeDev/PnP-PowerShell/blob/master/Documentation/readme.md">OfficeDev/PnP-PowerShell Reference</a>Unknown[email protected]3tag:blogger.com,1999:blog-8625187760026725920.post-83228034673895170372016-03-03T09:57:00.000-05:002016-03-03T13:54:11.356-05:00SharePoint - Export/Import Subsite<b>Scenario:</b><br /><br />Lets suppose we have two SharePoint 2013 site collections and we want to export a sub-site from one site collection to another using PowerShell, then below is the answer.<br /><br />Source: http://domain.com/sites/Site1/SubsiteA<br />Destination: http://domain.com/sites/Site2/SubsiteA <br /><br /><b>Solution:</b><br /><div>Export: <span style="font-family: "Courier New", Courier, monospace;">Export-SPWeb "http://domain.com/sites/Site1/SubsiteA" -Path "C:\Temp\Export.cmp" </span></div><div>Import: <span style="font-family: "Courier New", Courier, monospace;">Import-SPWeb "http://domain.com/sites/Site2/SubsiteA" -Path "C:\Temp\Export.cmp"</span><span style="font-family: "Courier New", Courier, monospace;"> </span></div><b><br /></b><b>Note:</b> All the list, libraries, documents etc will get exported except for the workflows. <br /><br />Ref: <a href="https://technet.microsoft.com/en-us/library/ff607895.aspx">https://technet.microsoft.com/en-us/library/ff607895.aspx</a><br />Ref: <a href="https://technet.microsoft.com/en-us/library/ff607613.aspx">https://technet.microsoft.com/en-us/library/ff607613.aspx</a><br />Ref: <a href="https://technet.microsoft.com/en-us/library/ee663490.aspx">https://technet.microsoft.com/en-us/library/ee663490.aspx</a><br /><b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br />Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-9137886304714326672016-02-10T11:24:00.000-05:002016-02-10T11:46:34.408-05:00SharePoint - PowerApps (Mobile Apps)So I can create mobile apps for Office365 without writing any code using Microsoft Power Apps......This is Awesome.<br /><br />URL: https://powerapps.microsoft.com/en-us/tutorials/get-started-test-drive/#save-and-share-your-app Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-16532744297009089832015-12-04T18:05:00.001-05:002015-12-04T18:10:24.141-05:00SharePoint - Responsive Design (Framework)You can go to my <a href="http://www.sharepointblue.com/2015/12/sharepoint-responsive-design-bootstrap.html">previous post</a> where I have explained how to implement responsive design in a SharePoint site using Bootstrap from scratch. Now we you will quickly figure out that implementing responsive design from scratch will take a lot of time, effort and learning. So in order to save time we will use a pre-built <a href="http://responsivesharepoint.codeplex.com/">framework</a> developed by a team of awesome people. <br /><br />Perform following steps for SharePoint Online sites:<br /><ol><li><a href="http://responsivesharepoint.codeplex.com/downloads/get/753973">Download</a> the WSP.</li><li>Follow page 17-22 of the <a href="http://responsivesharepoint.codeplex.com/downloads/get/753977">documentation</a>. </li><li>And the site will look like this:<br /><table><tbody><tr><td><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-hdjb6XaBdNE/VmIapSrtaRI/AAAAAAAAHdU/63h6CCvVmW4/s1600/Desktop.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="http://1.bp.blogspot.com/-hdjb6XaBdNE/VmIapSrtaRI/AAAAAAAAHdU/63h6CCvVmW4/s400/Desktop.PNG" width="400" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"></div><br /></td><td><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-GAiLU_BmJ_Q/VmIarEVWs5I/AAAAAAAAHdg/oUzDKkXYn7A/s1600/Safari.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-GAiLU_BmJ_Q/VmIarEVWs5I/AAAAAAAAHdg/oUzDKkXYn7A/s320/Safari.PNG" width="179" /></a></div><br /></td></tr><tr><td><div style="text-align: center;"><u>Desktop</u></div></td><td><div style="text-align: center;"><u>Mobile</u></div></td></tr></tbody></table></li><li>Now after the site has been made responsive and works all great. You can download the Master Page <b>foundation-4.3.2-server.master</b> and customize according to your own branding. See pages 23-25 of the documentation.</li></ol><div><br /></div><br /><br /><br />Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-3097532780459942632015-12-01T18:25:00.000-05:002015-12-04T18:09:44.666-05:00SharePoint - Responsive Design (Bootstrap)SharePoint Online pages are after all rendered as HTML/CSS and Java Script. In this post I will show how to create a responsive design for SharePoint Online pages using Bootstrap so that they look elegant on different screen sizes (Desktop, tablet, phone) .<br /><br /><b>Bootstrap</b> is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web. You can start learning about bootstrap <a href="http://getbootstrap.com/getting-started/">here</a>.<br /><br /><b>HTML Framework:</b><br />Following is the HTML framework that a HTML page should match in order to be responsive to multiple screen sizes.<br /><br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><html lang="en"><br /> <head><br /> <title>Bootstrap 101</title><br /><br /> <!-- Latest compiled and minified CSS --><br /> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"><br /><br /> <!-- Latest compiled and minified JavaScript --><br /> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script><br /> <br /> </head><br /> <body><br /> <br /> <div class="container"><br /> <div class="row"><br /> <div class="col-sm-6" style="border:1px red solid">Hello</div><br /> <div class="col-sm-6" style="border:1px green solid">World</div><br /> </div><br /> </div><br /> <br /> </body><br /></html><br /></code></pre><br />This code will create 2 responsive divs inside a main container div. Container div will render the content inside the two divs as following on Desktop and the Mobile devices with the help of Bootstrap libraries:<br /><table with="100%"><tbody><tr><td><div class="separator" style="clear: both; text-align: center;"></div><a href="http://4.bp.blogspot.com/-GZX-HO9pCPk/Vl4nTV61P9I/AAAAAAAAHcE/JLeyjLJ0i9Y/s1600/Desktop1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="80" src="http://4.bp.blogspot.com/-GZX-HO9pCPk/Vl4nTV61P9I/AAAAAAAAHcE/JLeyjLJ0i9Y/s400/Desktop1.PNG" width="400" /></a></td><td><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-XYAxcKrkTgs/Vl4ne9yc_iI/AAAAAAAAHcM/bqiJGamv0Rk/s1600/Mobile1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="http://4.bp.blogspot.com/-XYAxcKrkTgs/Vl4ne9yc_iI/AAAAAAAAHcM/bqiJGamv0Rk/s200/Mobile1.PNG" width="182" /></a></div><br /></td></tr><tr><td><div style="text-align: center;"><u>Desktop</u></div></td><td><div style="text-align: center;"><u>Mobile</u></div></td></tr></tbody></table><br /><b>Responsive SharePoint Page:</b><br />Now lets incorporate this framework in to a SharePoint Site.<br /><ol><li>Add following lines in the <b>head</b> tag of Master Page:<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-IKwIF_wv940/Vl4k6qUbKQI/AAAAAAAAHb4/32rN-b62Gp0/s1600/MasterPage.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="80" src="http://4.bp.blogspot.com/-IKwIF_wv940/Vl4k6qUbKQI/AAAAAAAAHb4/32rN-b62Gp0/s320/MasterPage.PNG" width="320" /></a></div></li><li>Add the container div in the page inside the <b>PlaceHolderMain</b> tag so that all the HTML of the page resides inside the container div:<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-wifkNOj3RpE/Vl4o_M9m-bI/AAAAAAAAHcY/8yGUugLxzPM/s1600/Container.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="81" src="http://1.bp.blogspot.com/-wifkNOj3RpE/Vl4o_M9m-bI/AAAAAAAAHcY/8yGUugLxzPM/s320/Container.PNG" width="320" /></a></div></li><li>Add the row div and then add the column divs to hold the actual web parts:<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-a5CHmb7ImEc/Vl4qZr5_0AI/AAAAAAAAHck/fK67fSWmtlM/s1600/Page.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="141" src="http://4.bp.blogspot.com/-a5CHmb7ImEc/Vl4qZr5_0AI/AAAAAAAAHck/fK67fSWmtlM/s400/Page.PNG" width="400" /></a></div></li><li>Now the web parts on the page will be managed by container div and page will look like this on different screens:<br /><table><tbody><tr><td><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-NGAVEYmAHak/Vl4r0Gjxb6I/AAAAAAAAHcw/YQKT6h4SW2g/s1600/Desktop2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="171" src="http://3.bp.blogspot.com/-NGAVEYmAHak/Vl4r0Gjxb6I/AAAAAAAAHcw/YQKT6h4SW2g/s320/Desktop2.PNG" width="320" /></a></div><br /></td><td><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-Ata14yi_yjk/Vl4r4KPeDOI/AAAAAAAAHc4/wt9WlMeTx1U/s1600/Mobile2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-Ata14yi_yjk/Vl4r4KPeDOI/AAAAAAAAHc4/wt9WlMeTx1U/s320/Mobile2.PNG" width="212" /></a></div><br /></td></tr><tr><td><div style="text-align: center;"><u>Desktop</u></div></td><td><div style="text-align: center;"><u>Mobile</u></div></td></tr></tbody></table></li></ol><br />Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-3791325683941625132015-08-27T17:52:00.000-04:002015-08-27T17:52:28.142-04:00SharePoint 2016(Preview) New FeaturesMicrosoft has released the new and improved features in SharePoint Server 2016 IT Preview. Check out the following link:<br /><b><br /></b><a href="https://technet.microsoft.com/en-us/library/mt346121(v=office.16).aspx">https://technet.microsoft.com/en-us/library/mt346121(v=office.16).aspx</a>Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-44544929440742578092015-08-25T10:34:00.000-04:002015-08-25T10:34:16.626-04:00SharePoint 2016 PreviewSharePoint 2016 Preview is available to download now. <blockquote class="twitter-tweet" lang="en"><div dir="ltr" lang="en">Breaking: <a href="https://twitter.com/hashtag/SharePoint?src=hash">#SharePoint</a> Server 2016 IT Preview and cloud hybrid search is here! Download now -> <a href="http://t.co/JCPzHQP3K9">http://t.co/JCPzHQP3K9</a> <a href="http://t.co/GDat7bv5rJ">pic.twitter.com/GDat7bv5rJ</a></div>— Microsoft SharePoint (@SharePoint) <a href="https://twitter.com/SharePoint/status/635845596167974912">August 24, 2015</a></blockquote><script async="" charset="utf-8" src="//platform.twitter.com/widgets.js"></script>Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-86277806326751341242015-08-10T15:44:00.003-04:002015-08-10T15:44:51.939-04:00SharePoint 2013 - Content Type HubContent Type Hub is part of Managed Meta Data Service and was introduced into SharePoint to share the Content Types across the site collections and web applications. It was introduced in SharePoint 2010 and now its available in SharePoint 2013 and Office365.<br /><br />I found this beautiful article to explain how to configure a Content Type Hub to share Content Type across other site collections and web applications:<br /><br /><a href="http://sharepoint-community.net/profiles/blogs/understanding-content-type-hub-cth-in-sharepoint-2013">http://sharepoint-community.net/profiles/blogs/understanding-content-type-hub-cth-in-sharepoint-2013</a><br /><br />Note: Its already configured for you in Office365 under <a href="http://myoffice365/sites/contentTypeHub">http://MyOffice365/sites/contentTypeHub</a>.<br /><br />Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-14900423788619882402015-03-18T16:28:00.002-04:002015-03-18T16:33:03.383-04:00SharePoint 2013 People Search REST CallYou can find the whole API reference for Search REST API <a href="https://msdn.microsoft.com/en-us/library/office/jj163876.aspx">here</a>. But when you have to do People Search then you need to put the context around your search Query and it will look like as follows:<br /><br /><b>Normal Search REST Call:</b><br /><a href="http://www.sharepointblue.com/SearchCenter/_api/search/query?querytext=%27*%27">http://www.sharepointblue.com/SearchCenter/_api/search/query?querytext='*'</a><br /><br /><b>People Search REST Call: </b><br /><a href="http://www.sharepointblue.com/SearchCenter/_api/search/query?querytext=%27*%27&sourceid=%27b09a7990-05ea-4af9-81ef-edfab16c4e31%27">http://www.sharepointblue.com/SearchCenter/_api/search/query?querytext='*'&sourceid='b09a7990-05ea-4af9-81ef-edfab16c4e31'</a><br /><br /><b>Note:</b> Before firing the People Search request, make sure User Profiles are crawlled inside the SharePoint by crawling: <b>sps3://My_Site_host_URL</b><br /><br />Ref: <a href="https://msdn.microsoft.com/en-us/library/office/jj163876.aspx">https://msdn.microsoft.com/en-us/library/office/jj163876.aspx</a>Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-18743240698960649962015-03-16T12:53:00.002-04:002015-03-26T12:17:06.262-04:00Predictive Analytics with AzureMLI started exploring AzureML(<a href="http://azure.microsoft.com/en-us/services/machine-learning/">Azure Machine Learning</a>) few weeks back and quickly fell in love with its simplicity and robustness.<br /><br />I grabbed the sample data of Down Jones Index from <a href="http://archive.ics.uci.edu/ml/datasets/Dow+Jones+Index">UC Irvine Machine Learning Repository</a> and applied the Linear Regression algorithm to create a prediction model to estimate the future values of Microsoft stock's opening weekly price (so that I can be rich) and here how my model looks like in AzureML.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-e_z-QhYV6LE/VQcFgYEDFbI/AAAAAAAAEJM/6HXeRncehdQ/s1600/MSFT.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-e_z-QhYV6LE/VQcFgYEDFbI/AAAAAAAAEJM/6HXeRncehdQ/s1600/MSFT.PNG" /></a></div><br />First I am removing the entire rows with missing values from the data. Then I am applying the filter for MSFT symbol in the first split and I am dividing the data to 80-20 ratio to train the actual model on 80% of the data with the help of Linear Regression algorithm. After that I am trying to predict price variable in Train Model and verifying it using 20% of remaining data. In the last, I am evaluating the model that how effective and reliable it is.<br /><br />At this point I need to seriously improve my model using other algorithms, removing/adding new variables etc because the <b>Coefficient of Determination</b> is nowhere closer to 1 and <b>Mean Absolute Error</b>, <b>Root Mean Squared Error</b>, <b>Relative Absolute Error </b>& <b>Relative Squared Error</b> are very high. But that's how a prediction model (more or less) will eventually look like in AzureML. It can be published as a web service with few clicks.<br /><br />I have published this experiment/source to AzureML gallery and can be accessed here:<br /><br /><a href="https://gallery.azureml.net/Details/3f4d92649bfa4fa3bf4b0c93a3635227">https://gallery.azureml.net/Details/3f4d92649bfa4fa3bf4b0c93a3635227</a><br /><br />My next step would be to grab data from SharePoint lists and apply some prediction algos on it.Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-49226886068604158052015-02-18T14:20:00.000-05:002015-02-18T14:20:32.307-05:00PowerShell - Download Images from WebI had a requirement where I have to export user profile images from MySite 2013 and I end up writing following PowerShell script:<br /><br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>[Reflection.Assembly]::LoadFile( `<br />'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.dll')`<br /> | out-null <br /><br />$FileName = "C:\Temp\ImagesURL.txt";<br />$Loc = "C:\Temp\Images\"<br />$ImageName = ""<br /><br />$wc = New-Object System.Net.WebClient<br /><br />$content = Get-Content $FileName<br />foreach ($line in $content)<br />{<br /> $Image = $Loc + $line.Substring($line.LastIndexOf("/") + 1)<br /> $url = $line<br /> <br /> Write-Host $url<br /> Write-Host $Image<br /> <br /> $wc.DownloadFile($url, $Image)<br /> <br />}<br /><br />write-host "Finished successfully."<br /></code></pre>Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-48959362240742346132015-02-13T12:20:00.000-05:002015-03-02T16:58:22.334-05:00HTTP Request with Javascript<pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><script type="text/javascript"><br /><br />var oReq = new ActiveXObject("MSXML2.XMLHTTP.3.0");<br /><br />function handler()<br />{<br /> if (oReq.readyState == 4 /* complete */) {<br /> if (oReq.status == 200) {<br /> document.getElementById("myDiv").innerText = oReq.responseText;<br /> }<br /> }<br />}<br /><br />function SendRequest()<br />{<br /> var vURL = "http://IdolApp:12345/data/data.xml";<br /><br /> if (oReq != null) {<br /> oReq.open("GET", vURL, true);<br /> oReq.onreadystatechange = handler;<br /> oReq.send();<br /> }<br /> else {<br /> window.console.log("AJAX (XMLHTTP) not supported.");<br /> }<br />}<br /><br /></script><br /></code></pre><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><input type="button" id="btnSubmit" value="Go" onclick="SendRequest()"/><br /><br/><br /><div id="myDiv" >:o)</div><br /></code></pre>Ref: <a href="https://msdn.microsoft.com/en-us/library/ie/ms535874(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/ie/ms535874(v=vs.85).aspx</a> <br /><br /><b>Note:</b><br />Initialize the oReq with following to make it IE and Chrome compatible:<br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>var oReq;<br /><br />if (window.XMLHttpRequest)<br />{// code for IE7+, Firefox, Chrome, Opera, Safari<br /> oReq=new XMLHttpRequest();<br />}<br />else<br />{// code for IE6, IE5<br /> oReq=new ActiveXObject("Microsoft.XMLHTTP");<br />}<br /></code></pre>Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-61506476907976588122015-01-19T14:59:00.001-05:002015-01-19T14:59:54.943-05:00Using Charts.js with ASP.NETFollowing is an example of using <a href="http://www.chartjs.org/">Charts.js</a> library to display nice graphs & charts after providing the data via C#/ASP.NET:<br /><ol><li>Download and unzip the Charts.js javascript library and add the entire folder into the ASP.NET project in the Visual Studio. </li><li>Add the refrence in head of ASP.NET:<br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><script src="Scripts/Chart.js-master/Chart.js"></script><br /></code></pre></li><li>Add the following javascript in ASP.NET file with .NET variables (ChartLables, ChartData1 & ChartData2) that will be populated via C#:<br /> <pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><script><br /> var randomScalingFactor = function () { return Math.round(Math.random() * 100) };<br /> var lineChartData = {<br /> //labels: ["January", "February", "March", "April", "May", "June", "July"],<br /> labels: <b><% =this.ChartLabels %></b>,<br /> datasets: [<br /> {<br /> label: "Query Count",<br /> fillColor: "rgba(220,220,220,0.2)",<br /> strokeColor: "rgba(220,220,220,1)",<br /> pointColor: "rgba(220,220,220,1)",<br /> pointStrokeColor: "#fff",<br /> pointHighlightFill: "#fff",<br /> pointHighlightStroke: "rgba(220,220,220,1)",<br /> <span style="font-family: 'Andale Mono', 'Lucida Console', Monaco, fixed, monospace;">//data: [0, 1, 4, 6, 10, 8, 6]</span><br /> data: <b><% =this.ChartData1 %></b><br /> },<br /> {<br /> label: "My Second dataset",<br /> fillColor: "rgba(151,187,205,0.2)",<br /> strokeColor: "rgba(151,187,205,1)",<br /> pointColor: "rgba(151,187,205,1)",<br /> pointStrokeColor: "#fff",<br /> pointHighlightFill: "#fff",<br /> pointHighlightStroke: "rgba(151,187,205,1)",<br /> //data: [28, 48, 40, 19, 86, 27, 90]<br /> data: <b><% =this.ChartData2 %></b><br /> }<br /> ]<br /> }<br /> function DrawChart() {<br /> var ctx = document.getElementById("canvas").getContext("2d");<br /> window.myLine = new Chart(ctx).Line(lineChartData, {<br /> responsive: true<br /> });<br /> }<br /> </script><br /></code></pre></li><li>Add the following HTML snippet to ASP.NET page where the chart will actually be displayed:<br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><div style="width: 100%"><br /> <div><br /> <canvas id="canvas" height="250" width="400"></canvas><br /> </div><br /></div><br /></code></pre></li><li>On the C# file (.NET code behind), simply populate the data into the three C# variables and call the javascript function DrawChart(); on some ASP.NET button click:<br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>public string ChartLabels = null;<br />public string ChartData1 = null;<br />public string ChartData2 = null;<br /><br />this.ChartLabels = "['January', 'February', 'March', 'April', 'May', 'June', 'July']";<br />this.ChartData1 = "[65, 59, 80, 81, 56, 55, 40]";<br />this.ChartData2 = "[28, 48, 40, 19, 86, 27, 90]";<br /><br />//Call the Javascript function from C#<br />Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "DrawChart()", true);<br /><br /></code></pre></li></ol><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-Pqj6gbIkjYQ/VL1hJP7fvnI/AAAAAAAAEIE/RUJbWaWLhFI/s1600/Chart.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-Pqj6gbIkjYQ/VL1hJP7fvnI/AAAAAAAAEIE/RUJbWaWLhFI/s1600/Chart.PNG" height="361" width="640" /></a></div><br />Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-43826445453303418102015-01-19T09:58:00.002-05:002015-01-19T09:59:05.986-05:00SharePoint 2007 - Hiding the Navigation<b>Scenario:</b><br />I had a small requirement to hide left and top navigation from a SharePoint 2007 Publishing Site on just one page (not the whole site).<br /><br /><b>Solution:</b><br />Two line javascrpit :o) in a hidden Content Editor Web Part, after identifying the IDs of the HTML elements which render the navigation.<br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><script type="text/javascript"><br /><br />document.getElementById('onetIdTopNavBarContainer').style.display = 'none';<br />document.getElementById('LeftNavigationAreaCell').style.display = 'none';<br /><br /></script><br /></code></pre>Unknown[email protected]0tag:blogger.com,1999:blog-8625187760026725920.post-86022256187153328912014-12-04T10:47:00.000-05:002014-12-04T12:12:07.543-05:00Reading XML with PowerShellHere is an example of accessing XML data via PowerShell:<br /><br /><b>Script:</b><br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>$xmlDocument = [xml] @"<br /><catalog><br /> <book id="101"><br /> <author>Author1</author><br /> <title>Title1</title><br /> <genre>Genere1</genre><br /> <price>45.95</price><br /> <publish_date>2000-10-01</publish_date><br /> <description>This is a description1.</description><br /> </book><br /> <book id="101"><br /> <author>Author2</author><br /> <title>Title2</title><br /> <genre>Genere2</genre><br /> <price>75.99</price><br /> <publish_date>1998-7-15</publish_date><br /> <description>This is a description2.</description><br /> </book><br /></catalog><br />"@<br /><br />$xmlDocument.catalog.book | Select-Object -Property author, title, price<br /></code></pre><br /><b>Result:</b><br /><pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>PS C:\Users\tnaveed\Desktop> C:\Users\tnaveed\Desktop\CheckUser.ps1<br /><br />author title price <br />------ ----- ----- <br />Author1 Title1 45.95 <br />Author2 Title2 75.99 <br /><br /></code></pre>Unknown[email protected]0