Through this blog, it is my effort to share experiences with the community and make the journey enjoyable.

Tuesday, November 14, 2017

Multi-factor Authentication (MFA) with CSOM

OfficeDevPnP.Core.AuthenticationManager is part of the PnP Core Library available here: https://www.nuget.org/packages/SharePointPnPCoreOnline

var authManager = new AuthenticationManager();
var ctx = authManager.GetWebLoginClientContext("https://contoso.sharepoint.com/");
Web web = ctx.Web;
User user = web.CurrentUser;
ctx.Load(web);
ctx.Load(user);
ctx.ExecuteQuery();
Share:

Saturday, February 18, 2017

Wednesday, February 15, 2017

SharePoint Framework (SPFx) Resources

Share:

SharePoint Framework - App File (.sppkg) Upload not working

Issue - On upload of app (.sppkg) file, App package not getting valid. On uploading, it is expected to SharePoint will display a dialog and ask you to trust the client-side solution to deploy.
However, popup is not coming. Also, Product ID is also blank

Reason - Your Tenant is not a Developer Tenant. SharePoint Framework is not available in production environment, so the only way you have to test it, is using a dev tenant. 

Resolution -

  1. Follow the steps to create a new Office 365 Developer Tenant - https://dev.office.com/sharepoint/docs/spfx/set-up-your-developer-tenant

  1. Convert existing tenant to Developer Tenant -  Make sure you have First Release options enabled.

After updating First Release settings, it may take a while to update the settings. Once updated, your tenancy would have SharePoint Framework Release enabled and App Packages will function as required.
Share:

SharePoint Framework Tutorials - YouTube Playlist

Share:

SharePoint Framework Yeoman template broken by TypeScript 2.1 definition

Building SharePoint Framework new project using gulp serve, gives errors for TypeScript building the project.

Issue - SPFx broken by Typescript 2.1 extensions
Resolution - npm install @types/lodash@4.14.50



SharePoint Framework - Starting a new project


  1. Setup your development environment based on the steps defined at https://dev.office.com/sharepoint/docs/spfx/set-up-your-development-environment

  1. At command prompt use following command - 

yo @microsoft/sharepoint

  1. Install the developer certificate for use with SPFx development, switch to your console, make sure you are still in your project directory and enter the following command:

gulp trust-dev-cert

  1. Enter the following command in the console to build and preview your web part:

gulp serve
Share:

Saturday, February 11, 2017

Ionic 2 - Visual Code - Extensions

When beginning development with Ionic in Visual Code, following extensions would save lot of effort and time -

https://marketplace.visualstudio.com/items?itemName=Thavarajan.ionic2
https://marketplace.visualstudio.com/items?itemName=justinjames.ionic1-snippets

Share:

Ionic2 - New Project - Error - no such file or directory, open '..\index.html'

After creating a new ionic 2 project, serving project for first time, gives error 
 Error - no such file or directory, open '..\index.html'

Resolution - 
- CLI version should be 2.1.0 not beta. If you run ionic -v and have anything other than 2.1.0, run:
npm uninstall -g ionic
npm install -g ionic
Share:

Visual Studio Ionic 2 - Error (DEP10402) : Could not locate the start page. You may need to build your project.

On creating new Ionic 2 project templates with Visual Studio 2015, build is failing with the Error  (DEP10402) : Could not locate the start page. You may need to build your project.

Reason - There is no files in www folder by the build.

Resolution -

Update your ionic app scripts to the latest version. It is 1.0.0 for RC5 release.
npm install @ionic/app-scripts@latest --save-dev
Update your package.json to match the following dependencies, remove existing node_modules directory, and then run npm install:
"dependencies": {
    "@angular/common": "2.2.1",
    "@angular/compiler": "2.2.1",
    "@angular/compiler-cli": "2.2.1",
    "@angular/core": "2.2.1",
    "@angular/forms": "2.2.1",
    "@angular/http": "2.2.1",
    "@angular/platform-browser": "2.2.1",
    "@angular/platform-browser-dynamic": "2.2.1",
    "@angular/platform-server": "2.2.1",
    "@ionic/storage": "1.1.7",
    "ionic-angular": "2.0.0-rc.5",
    "ionic-native": "2.2.11",
    "ionicons": "3.0.0",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.26",
    "sw-toolbox": "3.4.0"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.0.0",
    "typescript": "2.0.9"
  }




Share:

Search This Blog

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway. All posts are provided "AS IS" with no warranties, and confers no rights. In addition, my thoughts and opinions often change, and as a weblog is intended to provide a semi-permanent point in time snapshot you should not consider out of date posts to reflect my current thoughts and opinions.

Popular Posts

Total Pageviews