Introducing ProConnect – now available in office and windows phone store

I am very pleased to share news with you that “ProConnect” is officially launched and is now available in both office and windows phone store.

Last year, I discovered a need for enterprise level location rich business networking application. I had my vision about what ProConnect will be. I gave myself a challenge to make it reality and have been working on this since then. ProConnect also got very good interests from some of ProSigma’s clients, finally I decided to take it to the next level and make it available to all users‏ from the Office and windows phone store. Today, I am very happy to present you ProConnect.

ProConnect is a secured location based business networking application that helps you keep in touch with your colleagues anywhere!

It is a subscription based service which also offers 1 month free trial.

To discover more and start using ProConnect please go to the office store, install the application, activate your free trial and explore!

ProConnect also comes with supporting windows mobile application for free for you to stay connected while on the move.

ProConnect Features:
• Create, store and share location based updates with your colleagues using checkin
• Create and manage places of interests such as company’s offices, recommended hotels and restaurants, client’s offices, meeting places, conference venues etc.
• Follow places and people and stay in touch with their most recent updates
• Receive real-time notifications of checkin activities
• See your real-time location on the map and find your near-by colleagues and places
• Highly interactive mapping user- interface using open source library
• On the go access on windows phone app.
• Complete peace of mind having all your data at your server (ProConnect store checkin updates in SharePoint lists at your servers)

Office store link :

Windows phone store link :

Visit store link to get more details on ProConnect features.

Please visit http://prosigmaltd.com/ProConnect if you have any query or suggestion related to ProConnect.

Also, feel free to contact for more details on ProConnect.

Stay tuned, more coming soon…

Advertisements

Article 23 from 30 : Troubleshooting High-Trust App

This post is article 23 from the 30 Articles App series for SharePoint

In this article I will be discussing about basic guidelines on troubleshooting tips for High-Trust apps. I assume that you already has good understanding of High-Trust app and how to develop one.

Below are some steps you should consider to look into when you run into problems:

(1)    For Hight-Trust App your remote web’s web.config should have appsetting something like below

<appSettings>

<add key="ClientId" value="your-client-id-guid-in-lowercase"/>

<add key="ClientSecret" value="client-secret"/>

<add key="ClientSigningCertificatePath" value="C:\cert.pfx"/>

<add key="ClientSigningCertificatePassword" value="****"/>

<add key="IssuerId" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"/>

</appSettings>

(2)    Refer to article-15 to know about how to configure high-trust using client-certificate and configuring high-trust.

(3)    App deployed successfully but client context is always null or you are getting 401 unauthorized error

Make sure you are passing valid identity of Logged in user,

Do iisreset after high-trust configuration if necessary

(4)    App deployed successfully but you are getting 403 forbidden error

oAuth requires SharePoint to run HTTPS. So whenever your SharePoint app attempt to make a call using a test certificate, you will get 403 (forbidden) error.

To overcome this issue, simply turn off HTTPS on your development SharePoint environment using following Powershell command:

$serviceConfig = Get-SPSecurityTokenServiceConfig
$serviceConfig.AllowOAuthOverHttp = $true
$serviceConfig.Update()

Hope that helps..!!

Article 22 from 30 : Troubleshooting Provider-Hosted App

This post is article 22 from the 30 Articles App series for SharePoint

In this article I will be discussing about basic guidelines on troubleshooting tips for provider hosted apps. I assume that you already has good understanding of provider hosted app and how to develop one.

Below are some steps you should consider to look into when you run into problems:

(1)    Make sure your remote web is already up and running before you deploy your app.

(2)    Make sure all the service are up and running and they have valid listening endpoints if you are using any remote receivers.

(3)    Make sure that you have valid client id in App manifest file, which must be exactly same as client id in your remote web’s web.config file

(4)    Make sure the client id is in lowercase in (3).

(5)    Make sure you have registered your app with SharePoint. You can register your app from Appregnew.aspx  page. It is available via following url : https://SPServer/Sites/AnySiteCollection/_layouts/15/Appregnew.aspx

Store the client id and secret and use that in (3)

appregnew

(6)    When you are deploying your app to office store you can generate client id, Client Secret from office seller-board.

(7)  Make sure your app has all the necessary permission.

Troubleshooting tips continues for Hight-Trust provider hosted app in next article.

Hope that helps..!!

Article 21 from 30 : what can be included in SharePoint App?

This post is article 21 from the 30 Articles App series for SharePoint

One of the common question I get from many readers is that what possibly they can do with SharePoint App? So here in this article I will discuss about what possible SharePoint artifacts and components you can include in an App.

One explicit limitation of the SharePoint App Model is that no server-side code can reside on the SharePoint farm as part of an App, and so if your app need to use any server-side code then it must be hosted outside of SharePoint either in the cloud or on-premises. So and when applicable any use of server-side code need cloud App Model. And the main benefit is that you can always scale your application without affecting the current SharePoint environment.

So here it begins, You can create/include all sort of SharePoint components mentioned below in your SharePoint App :

Fields (of field types that are built into SharePoint)

Custom content types

Custom List templates

List and library instances

Custom list views

Custom list forms

Remote event receivers -> check Article -17, 18 for more details

Custom actions (including shortcut menu items and ribbon customizations) -> Check Article -12

Modules, Pages, CSS, JavaScript files used by SharePoint pages,

SharePoint WebParts (built-in) and app parts -> Check Article -8

You can also include Features (Web-scoped only), Web templates (but not site definitions), BCS Models (web-scoped only), external Content types and external lists referencing to that BCS Model, Property bags; and Workflows (SP2013 workflows now use Azure hosted workflow runtime. Coded workflows that use the SharePoint-hosted workflow runtime cannot be included in an app for SharePoint.Only declarative workflows or workflows that use the newer runtime are allowed. to see what’s new in SP2013 workflow check this)

Article 20 from 30 : Implementing Cross Domain calls

This post is article 20 from the 30 Articles App series for SharePoint

I assume you have read article -19 to understand basic about cross-domain calls in SP Apps.

In this article I will discuss about implementing cross-domain communication from an SharePoint app.

crossdomaincalls

  • Let’s get started with placing SP.RequestExecuter.js library ( you can find this in LAYOUTS folder ) into you app project. you can put this file in scripts folder in your app project.
  • Register the trusted domain(s) in your app manifest like below.
    Lets say for example I want to put otherdomain.com as a trusted domain so I am registering that as following.

     <AppPrincipal> 
       <Internal AllowedRemoteHostUrl="https://otherdomain.com/" /> 
     </AppPrincipal>
    
  • With this library you can use REST or JSOM to communicate with SharePoint
  • For REST option you will need to create a new SP.RequestExecutor as following.
    var executor = new SP.RequestExecutor(appweburl);
    executor.executeAsync(
    {
    url:
    appweburl +
    "/_api/SP.AppContextSite(@target)/web/lists/getbytitle('aanuslist')?@target='" + targeturl+ "'" ,
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    success: successHandler,
    error: errorHandler
    }
    );
  • If you choose JSOM then get client context as below.
    var context = new SP.ClientContext(appweburl);    
    // context: The ClientContext object provides access to the web and lists objects. 
    var factory =  new SP.ProxyWebRequestExecutorFactory(appweburl); 
    // factory: Initialize the factory object with the app web URL. 
    context.set_webRequestExecutorFactory(factory); 
    var contextt = new SP.AppContextSite(context, targeturl);
    
    //Get the web and list objects and prepare the query 
    var web = contextt.get_web(); 
    var list = web.get_lists().getByTitle("aanuslist"); 
    var camlString = "<View> <ViewFields>" +
                     "<FieldRef Name='Title' />" +           
                     "</ViewFields> </View>";
    var camlQuery = new SP.CamlQuery(); 
    camlQuery.set_viewXml(camlString); 
    allItems= list.getItems(camlQuery); 
    context.load(allItems, "Include(Title)"); 
    //Execute the query with all the set options and parameters 
    context.executeQueryAsync(successHandler, errorHandler);
    
    
  • Make sure in both scenarios your page includes reference to the cross-domain js library

Happy reading… and see you guys for the next article 🙂

Article 19 from 30 : Understanding Cross Domain calls

This post is article 19 from the 30 Articles App series for SharePoint

In this article, I will discuss about Cross-Domain Calls, what are they and how to make it happen for Apps.

What is Cross-Domain Call?

As the name suggests whenever an app/programme wants to make client-side calls (for example, using JavaScript + XMLHttpRequest) from a page hosted in one domain (for example, http://www.domain_1.com/appPage.html) to a page or service hosted in a different domain (for example, http://domain_2.com) , it is called Cross-Domain call.

Cross-Site Request Forgery is an attack that tricks the victim into loading a page that contains a malicious request. It is malicious in the sense that it inherits the identity and privileges of the victim to perform an undesired function on the victim’s behalf, like change the victim’s e-mail address, home address, or password, or purchase something. these type of attacks generally target functions that cause a state change on the server but can also be used to access sensitive data.

By default, browsers block this type of communication for security reasons; they don’t want malicious apps to grab data or execute code without users knowing it. 

What to do when your app actually wants to make safe and trusted cross-domain call?

The App model for SharePoint and remote-hosting options easily put developers to face cross-domain challenges.  So how to achieve this trusted and secure connection? Well SharePoint offers Cross-Domain JS library SP.RequestExecutor.js which you can find in LAYOUTS directory. By utilizing this library, your app can incorporate information from SharePoint into your app and from your app it’s been utilized it to other web apps.

How does it actually work?

crossdomaincalls1

Behind the scene this JavaScript library uses hidden IFrame, PostMessage and proxy page to take care of making secure connection to SharePoint. This proxy page is responsible for forwarding calls to the underlined SharePoint infrastructure.

Your app will also need permission to make cross-domain calls and also have to have registration for the “allowed domains”.

Check the next article to know more about how to implement cross-domain calls in SharePoint Apps.

Article 18 from 30 : Tenancies and app scope for SharePoint Apps

This post is article 18 from the 30 Articles App series for SharePoint

In this article, I will discuss about tenancy , app scope and how does that affect the app.

What is Tenancy?

A Tenancy in SharePoint 2013 is a set of site collections.

In SharePoint Online (ex. O365 SharePoint environment) this set of site collections belong to a single customer account.

For on-premise, it could be all of the site collections from the web application, some of it or it can be from multiple web applications as well.

A tenancy can have an app for SharePoint app catalog just as a SharePoint web application can.

What is App Scope?

Tenant administrators can decide the app scope for an app either tenant scope or web scope.

App scope is neither the feature scope nor the app permission levels used while developing the app.

If the app is uploaded to the SharePoint app catalog of a tenancy, it is available to all the websites within that tenancy. It can be installed website-by-website basis. App installed this way have web scope.

If Tenant administrator batch install the app to a subset of websites within the tenancy, then the apps have the tenant scope. Tenant administrator can decide on which websites within the tenancy the app can be installed.

The interesting part comes here 🙂

If an app that includes an app-web is batch-installed, only one app web is created and it is shared by all the host websites on which the app is installed. The app web is located in the site collection of the corporate app catalog.

So you as an app-developer cannot decide the app scope. Only the tenant admin can choose the app scope by choosing the relevant deployment method for the app.

Article 17 from 30 : Using Remote Receivers to handle spappweb list/listItems events

This post is article 17 from the 30 Articles App series for SharePoint

In article 16, we have seen how we can use remote event receivers to handle App related events.

In this article, I will discuss about how you can handle list-events remotely.

I am talking about a scenario when you have some data in sharepoint artifacts; And you want to handle any change remotely.

Let’s take an example. We have a Issue-List in our cloud-hosted app and we want an engineer(s) will receive an email whenever a new entry is created.

We need to handle the ItemAdded event for our Issue-List.

Ok. Let’s get started :

In my App I have already created the Issue-List.

Now select sharepoint-app project and -> add new item -> remote event receiver

remoteReceiversList1

remoteReceiversList3

This will generate new service in your web-project and also make necessary changes to app-manifest.

remoteReceiversList4

There you go. Now you can handle list item-added event.

Hope that helps.

 

Article 16 from 30 : Using Remote Receivers to handle app events

This post is article 16 from the 30 Articles App series for SharePoint

Today I will talk about how to handle app events with Remote Event Receivers !!

Do you need to perform some precise tasks when your app is installed or upgraded, well then you must use Remote Event Receivers.

Remote Event Receivers are only available to cloud(auto/provider both) -hosted app but not to SharePoint-Hosted app. [ When you try to add event receivers to SharePoint-hosted app it will be automatically converted into auto-hosted app !!]

How to create event receiver for your app-events:

Go to your SharePoint-app project -> Right click and go to property => Now set value =true to “Handle App Installed” and rest of the events that you want to handle.

remote_App1

This will generate AppEventReceiver.svc service in your web-project and also make necessary changes to app-manifest as below:

remote_App2

In the ProcessEvent method you can handle app related events… App Installed, App Upgraded, App Uninstalled

Pass the second variable true for SPAppWeb-clientcontext and false for SPHostWeb -clientcontext to the CreateAppEventClientContext method of TokenHelper.

Hope that helps.

 

Article 15 from 30 : Configuring Server to Server High Trust for provider hosted apps

This post is article 15 from the 30 Articles App series for SharePoint

Today, I will discuss about what is High-Trust Apps and how to configure s-2-s protocol.

What is a High-Trust App?

It is provider-hosted app for on-premise environment use and not proposed for cloud-hosted environment. It uses server-to-server protocol to create “High-trust”. It is considered “high-trust” because it is trusted to use any user identity that the app needs, because the app is responsible for creating the user portion of the access token.

A high-trust app uses a certificate instead of a context token to establish trust.

Apps that use the server-to-server protocol would typically be installed behind the firewall in instances that are specific to each individual company.

How to configure server-to-server high-trust?

Step-1 : Configure an app for use as a high-trust app

creates and exports a test certificate by using the Create Self Signed Certificate option in IIS.

1-SelfCertificate

create .pfx file ::

Go to IIS Manager -> Choose Server Certificates  -> right-click and choose “Create Self-signed Certificate”.

2-SelfCertificate

select just created certificate ->export the .pfx file

Include ClientSigningCertificatePath and password  for this .pfx file to web.config file of the app.

create .cer file ::

select just created certificate -> double click and choose the “Details” tab -> on bottom right corner click the “Copy to File”

3-SelfCertificate

The certificate export wizard will start and choose don’t export the private key. keep the default values for file format. choose the path for .cer file and export.

4-SelfCertificate

Step-2 : Configure SharePoint 2013 to use high-trust apps
Pre-requisite : you should have configured the App isolation for on-premise environment at this point.

the app management service and user profile application should be started and running

at least one profile is created in the User Profile Service Application as follows

 

Run following powershell script using SharePoint Management Console:

(1) get appId
$appId = your app id (Guid) here. All letters of the client-id must be of lowercase.

(2) get spweb where you want to deploy your high-trust app
$spurl ="http://yoursharepointSite"
$spweb = Get-SPWeb $spurl

(3) Get the current authentication realm for your SharePoint site
$realm = Get-SPAuthenticationRealm -ServiceContext $spweb.Site

(4) Get the corresponding file to the .cer file you are using for the app => the one we just created in step-1
$certificate = Get-PfxCertificate $publicCertPath

(5) Get the app Id together with the realm value.
$fullAppIdentifier = $appId + '@' + $realm

(6) Create a trusted security token service. This basically fetches metadata from your app and establish trust with it, so that SharePoint 2013 can accept tokens that are issued by your app.
New-SPTrustedSecurityTokenIssuer -Name "High-Trust-App-Name" -Certificate $certificate -RegisteredIssuerName $fullAppIdentifier

(7) Register the app principal with the app management service, so you can grant app permissions.
$appPrincipal = Register-SPAppPrincipal -NameIdentifier $fullAppIdentifier -Site $spweb -DisplayName "High-Trust-App-Name"

Now you have successfully configured server-to-server high trust and the app can use certificate instead of a context token.

Hope you all had a lovely Christmas and wish you all a very happy and healthy new year..!!