Showing posts with label Office. Show all posts
Showing posts with label Office. Show all posts

Wednesday, July 20, 2016

Easily construct Outlook Group Connector JSON messages in C#

Hi All,

If you are building an Outlook Group Connector that you are spending a lot of time writing JSON message & specifying different schema elements and attributes to be able to build a canvas that looks like this below figure, so i got good news for you!




I got your back and published an Outlook Group Connector SDK ver. 1.1 nuget package that includes tons of extension methods and features that helps your easily build your JSON payload message.


How to send a message in C# to a group:


                Message message = new Message()
                {
                    summary = "This is the subject for the sent message to an outlook group",
                    title = msg
                };
                message.AddSection(nSec1);
                message.AddFacts("Facts", facts);
                message.AddImages("Images", images);
                message.AddAction("check details here", "http://mostafaelzoghbi.com");


                var result = await message.Send(webhookUrl);


GitHub Code and Sample links:

1) GitHub Repo for SDK and Samples apps including console & web apps (link).
2) NuGet package that has been published to use it in your apps (link) or search for "Office365ConnectorSDK" in VS 2015.

Hope this helps.

Friday, July 15, 2016

Get started with Outlook Connectors with a sample showcase application

Hi All,
Office 365 Connectors provide a compelling extensibility solution for developers. Developers can build connectors through incoming webhooks to generate rich connector cards. Additionally, with the new "Connect to Office 365" button, developers can embed the button on their site and enable users to connect to Office 365 groups.

A sample showcase for outlook connectors integration
I have built this application that demonstrates outlook connector integration showcase that includes an integration for "Connect to Office 365" button into a third party website and how to send a detailed canvas message to a group.
How to Use it:
  • Outlook Connector landing page: Click on "Enterprise" menu item, install our connector into one of your office 365 groups.
  • Send a message to any group: Click on "Send Message" menu item, set a title message and group name and click on Send button. Check your group and you will be notified with a full detailed canvas message.



Useful Resources: 

A general overview of what Office 365 Connectors are and how end-users interact with them.

Complete documentation for building Office 365 Connectors.

A sandbox environment for developer experimentation.


Create and manage outlook connector settings in this dashboard.


Enjoy!

Monday, June 27, 2016

How to call cURL from Command Line

Hi All,

I installed cURL tool on my windows 10 machine, after i installed it; I tried to use this tool to post JSON messages over HTTP web hook endpoint.  But when i open the command line and type in curl, i get the following error:

'curl' is not recognized as an internal or external command, operable program or batch file.

By default, when you install cURL it gets installed on this default directory:
C:\Program Files\cURL

If i navigate to the installation path in command line window and type in curl, the tool will start working. but because i don't want to remember this path every time i want to use this tool, i need to add it as a system variable so the system knows where to points to when i call it.

Here is how to accomplish this:

1) Open Control Panel.
2) Click on System and Security.
3) Click on Advanced system settings link on the left pane.
4) This will open system properties pop up window.
5) Click on Environment variables button from advanced tab.
6) Click on New button from Systems Variables section (bottom section).
7) Add the following variable name information:

Variable name: curl
Variable value: C:\Program Files\cURL\bin



8) Click on OK button.
9) Open a new window from command line and type curl.
10) Now you can start using curl tool from command line without the need to navigate to the installation directory of the tool.



Enjoy!


Thursday, June 16, 2016

Unleash the power of office add-ins with Office Development Patterns and Practices

Hi All,

I was pleased to speak at Cap Area .NET SharePoint Special Interest Group user group yesterday.
In this presentation i covered the underlying concepts of extending office applications and how Microsoft is supporting the component architecture by enabling web extensiblity framework (WEF); hence the WEF is the core runtime platform for building web based extensions or addins to office applications.

I covered the following topics:
1) Office Add-Ins overview: Add-ins shapes/types, runtime framework, anatomy of office add-in.
2) Building Office Add-Ins using open source tools such as: Yeoman tool (yeoman.io) provides a scaffolding platform for office addins templates. while when creating an add-in using yeoman tool you will be able to use any text editor to develop your office add-in.

2) VS tools for Office Add-ins: this covers updated tools in Office Developer tools in VS 2015 version 2 that contains web addins and VSTO templates as well.



Code Samples:
1) UPS Tracker Add-in on Github is here.
2) Using Yeoman Tool for building Office Add-ins: https://code.visualstudio.com/Docs/runtimes/office


Enjoy!

Monday, April 04, 2016

Integrate a Power BI report into an app

Hi All,

This blog post is a walk through article on how to embed a PowerBI report in an application. This blog post with source code is available in GitHub.

I can say this feature is one of the most requested features from clients i worked with directly.
Below is a screen shot of the running application i have created that contains an integrated PowerBI report i have created in Office 365 tenant using PowerBI.


How to run the application:

1) Register your application in Azure AD, here are the configurations we need to update ASP.NET MVC app:

  • Client Id
  • Secret Id
  • Return Url: If you want to change it from the original app code.
Below screen shots show Azure AD (AAD) app registration settings in Azure portal:





2) Login to your PowerBI (app.powerbi.com) and get the Report Id you want to embed in the app:

Select a report that you would like to embed, grab a report Id from the browser url.
Below screen show shows a selected report "RPT1" and highlighted ReportId we will embed in our app.




3) Open ASP.NET MVC Project settings in VS 2015 and update Client Id and Secret Id from Azure Portal after registering your app.



4) Open index.cshtml and update iframe src attribute by adding the Report Id we captured in step #2.

 <iframe ID="iFrameEmbedReport" src="https://app.powerbi.com/reportEmbed?reportId=11156ed2-ede7-4b60-ac26-10cda004bdee" height="768px" width="1024px" frameborder="1" seamless></iframe>
 5) Run the app, Click on o365 login, Sign In and then PowerBI report will be showing after your login to the app.


Demo source code url: https://github.com/melzoghbi/PowerBIEmbeddedApp


References:
1) Integrate a Power BI tile or report into an app

2) Power BI Embedded home page:
https://azure.microsoft.com/en-us/services/power-bi-embedded/

Enjoy!

Wednesday, January 13, 2016

Office Add-Ins development best practices


Office Add-Ins development best practices


In this video i am covering office add-ins development best practices. The video covers how to provide clear value for Office add-ins, UX principles, market your add-in, publishing strategies, monitor and optimize add-in performance. The video is covering what you need to do from the inception phase of creating an add-in till publishing add-ins to your customers.

 

If you would like to get to know more about "The basics of office add-ins", i have posted earlier another video for that here:

Thursday, October 28, 2010

Integrate External SharePoint 2010 List to Outlook 2010

Hi All,

A friend of mine asked for how to integrate SharePoint 2010 external list that is configured to pull information from an external system into outlook 2010.

So, To begin the office 2010 has unique and enhanced integration with sharepoint 2010, If you are able to configure SharePoint 2010 to pull data from external data using BCS Exteranl List. You will be able to manage this list in outlook 2010.

First, When you create external list that is designed to be used in outlook the ECT ( Exteranl Content Type ) has to be with type Office item type and select from the options: Task, Post, Appointment or contact.

How to connect to external list using SPD:
1) Open SPD with the SP site.
2) Select External content type and click on External content type from the ribbon.
3) Type the ECT name and select the office item type from the list.
4) select the data source and do the mapping.
5) Note: You have to map the fields to the appropriate office mapping.
6) Save your ECT and click on Create Lists and Form from the ribbon.
7) Now you have the ECT and the list in the SharePoint Site.
8) Before test the list, set the permission to the External list from the central admin -> application management -> application services -> select BCS -> select your list and click on set permissions - > provide the required permissions per user.
9) Visit your SP site and click on lists link and select your list to check it.

Note: I went through how to create ECT and External List in SP 2010. There is more tips and security best practices for above items - Please check MSDN how to setup BCS with SSS service.

How to get the created external list on your outlook ?
1) Select your list.
2) Select List tab and click on connect to outlook.
3) an Add-In will be installed and configured to your outlook 2010 to the list.

Now, You will be able to manage the list once the configuration is done and outlook will be launched automatically once SP 2010 is done with the configuration.












Another Question: How can i change the mapping for the created ECT ?
The only thing you need to do is to open SPD and select your ECT - > Read Item and then click on Edit Operation from the ribbon and change the ECT field mapping and save it.

Tip: if you have your outlook 2010 is opened, and you right click on the contact list and run the sync option you won't be able to get the new mapping fields. Close the outlook and open it again.













Hope this helps.

Regards,
Mostafa Arafa
twitter.com/mostafaelzoghbi