Saturday, January 27, 2018

Microsoft Azure : Resolve - You don’t have access to this data. Please contact your global administrator to get access

I have been using my Azure subscription for a long time. But I was surprised when I got following error message when I tried to play around with Azure Active Directory

image

I can’t even add ore remove users!

Then I realized that I have associated my subscription to someone else's directory when creating the tenant.

Following are the steps I used to bring my tenant back to normal, where I have access to all features.

1. Create a new Azure Active Directory

image

image

image

2. Change directory in Azure Subscriptions

image

image

image

image

image

3. Verify

image

image

As you can see all my assets (including VMs) are unharmed.

Thursday, January 18, 2018

Presentation - Continuous Integration with SharePoint

I presented regarding ALM with SharePoint in SharePoint Sri Lanka Forum on 10th January 2018.

26239066_10156123357012716_4941186543697729196_n

26229564_10214594227070477_8761087956115667399_n

Following is the presentation I did

Monday, January 15, 2018

Automate build and release for SharePoint Framework solution

This is the third part of the article series on how to manage SharePoint Framework solution in a team environment

  1. Configure SharePoint Framework solution with Git
  2. Integrate SharePoint Framework solution in to TFS project
  3. Automate build and release for SharePoint Framework solution

In this blog post I’ll explain how to automate build and release process for SharePoint Framework solutions. This uses ALM API which was released recently.

Configure Solution

Add following script to the root of the solution. This script will retract if previous version of the solution already exists. Then it will add the solution to App Catalog site and then to the SharePoint site that you wish your customization to be published.

Param(

[string]$username,

[string]$password

)

$packagePath = ".\release\sharepoint\solution\sp-fx-test.sppkg"

$encpassword = convertto-securestring -String $password -AsPlainText -Force

$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $encpassword

Connect-PnPOnline -Url "https://dinushaonline.sharepoint.com/sites/dev" -Credentials $cred

$appExist = Get-PnPApp | ? { $_.Title -eq 'SPFxTest' }

if ($appExist -ne $null) { 

Uninstall-PnPApp -Identity $appExist.Id

Unpublish-PnPApp -Identity $appExist.Id

Remove-PnPApp -Identity $appExist.Id

}

Add-PnPApp -Path $packagePath -Publish -Overwrite

$appAfterAdd = Get-PnPApp | ? { $_.Title -eq 'SPFxTest' }

Publish-PnPApp -Identity $appAfterAdd.id

Install-PnPApp -Identity $appAfterAdd.id

image

Configure Build

Create a new build definition in your TFS Online environment to perform continuous integration

image

image

We have to perform npm install, gulp bundle, ship and archive steps in following steps

image

image

image

image

image

image

Configure Release

Create variables for SharePoint online username and password which will be used in publishapp.ps1 script

image

image

image

image

image

image

Enable Continuous Deployment

This step will be used to automatically trigger a release as soon as a build is succeeded

image