How to quickly deploy PnP component to your demo tenant?

Before you want to develop anything on SPFx component (Webparts or Extensions) I suggest check out two following links on the PnP Open Source. Look/find for the component which meets your need “as is” or if you want to extend the component. &

To research the inner working of the component you can follow few simple steps to deploy the desired component to your demo tenant.

Step # 1: Fork the PnP repository of WebPart or Extensions based on the need. OR

Step # 2: Please add the following two secret variables.

adminUsername = admin@{TENANTNAME]
adminPassword = [your password]

Step # 3: In your new forked repository click on the Actions to create a new workflow. Copy the following content to the GitHub Actions YAML file.

Step # 4: Now look for the following line with the highlighted text and replace the sample name you want to deploy. e.g. the following setting will deploy ‘react-directory’.

SAMPLE_TO_BUILD_DEPLOY: './samples/react-directory'

Posted in Uncategorized | Leave a comment

SPFx CICD using GitHub Actions

Use following very simple steps to get SPFx web part or extensions to your tenant.

I recommend use the following two links to get any sample code.

#1 Lets assume you want to get the “js-application-alert-message“. Create a Git Hub Repo.

#2 Copy entire directory “js-application-alert-message” to a new location say ‘c:\demo\js-application-alert-message’ e.g.

xcopy react-application-festivals*.* c:\demo2\
*.* /E /F

#3 Push the new directory with the code to the NEW GitHub repo using the following commands.

git init

git add *.*

git commit -m “first draft”

git remote add origin

git push -u origin master

#4 Now your source in the GitHub repo. It is time for creating two new secrets.

adminUsername (I used the admin@[TENANT_NAME]

adminPassword (password for the tenant)

on your repo click on “Settings” then click on the “Secrets”.

Add about two new secrets.

#5 Now it is time to add the GitHub Actions Workflow.

#6 Check the build and deploy is complete.

Posted in Uncategorized | Leave a comment

How to add a file to SPO using REST API?

Here the PowerShell code for it.

$url = ‘′

$headers = @{
‘Content-Type’ = ‘application/x-www-form-urlencoded’
‘Accept’ = ‘*/*’
$client_Id = ‘YOUR-CLIENT-ID
$client_secrect = ‘YOUR-CLIENT-SECRET
$body = $(“grant_type=client_credentials&client_id={0}%40{1}&client_secret={2}%3D&resource=00000003-0000-0ff1-ce00-000000000000%2F{3}{4}” -f $client_Id,$TenantID,$client_secrect,$TenantName,$TenantID)

$item = Invoke-WebRequest -Method POST -Uri $url -Headers $headers -Body $body -UseBasicParsing

$response = ConvertFrom-Json $item

$url=’ Documents%27)/Files/add(url=%27NAME-OF_FILE.csv%27,overwrite=true)’

$headers = @{
‘Authorization’ = $(“{0} {1}” -f $response.token_type,$response.access_token)
‘Accept’ = ‘application/json; odata=verbose’
‘Content-Type’ = ‘text/csv’
$r = Get-Content C:\0-VA\NAME-OF_FILE.csv | `
Invoke-WebRequest -Method POST -Uri $url -Headers $headers -UseBasicParsing

Note: To get client id and secret use the following link.

Posted in Uncategorized | Leave a comment

Governance, management and lifecycle in Microsoft Teams

Role Based Access Control

Teams settings

Messaging policies

Meeting settings

Meeting policies

Live events policies

External access

Guest access

Ability to create teams

Classification for teams

Retention policies

Expiration policies

PowerShell for Teams

Graph API for Teams

Posted in Uncategorized | Leave a comment

Build 2020 Videos

SK100 Building modern enterprise-grade collaboration solutions with Microsoft Teams
SK101 Transform everyday business processes with Microsoft 365 platform integrations
SK102 What’s new with Microsoft Teams as a platform
SK106 Tips for Teams developers: Authentication and proactive messaging
SK107 Developing with the Fluid Framework
SK108 Microsoft Graph data and services – a deep dive for developers
SK109 A blueprint for building trustworthy apps that reach millions of users
SK110 What’s new with Microsoft Graph
SK111 Extend Microsoft 365 experiences with Graph Connectors
SK112 Transforming information to knowledge using Project Cortex
SK113 Use External Identities to build digital experiences for any user
SK114 Building trust into digital experiences with decentralized identities – Introducing Verifiable Credentials
SK115 Building apps for modern productivity with To Do in Microsoft Graph
SK116 Build richer people experiences with Profile API on Microsoft Graph
SK117 Smart meetings, room, places and event sync in Microsoft Graph
SK118 Add cloud-based printing to your application with Universal Print
SK119 React Native: Build cross platform apps that target Windows, Mac, and more!
SK120 Microsoft Edge DevTools for web developers
SK121 End-to-end web development with VS Code and Microsoft Edge
SK122 Building rich app experiences with Progressive Web Apps
SK123 How to bring your Android apps to Surface Duo with Xamarin
SK124 Application security and deployment [MSIX]
SK125 Foundation: Get started building modern Windows 10 apps
SK126 Harness the power of WebRTC in your Windows apps with the new WinRTC!
SK127 Building apps for 1 billion Windows 10 Desktops and expanding reach w/ Windows Virtual Desktop
SK128 WebView2: Bringing the best of the web to your native apps
SK129 Building Extensions for the new Microsoft Edge
SK130 Windows AI: hardware-accelerated ML on Windows devices
SK131 Fluent Design System – Building apps that feel natural on every device
SK133 Accessibility Insights: Open source accessibility testing tools
SK134 Adaptive Cards – The next gen of contextual user experiences in your apps and Microsoft 365
SK135 The Windows Command-Line: Windows Terminal & WSL 2
SK136 Foundation: Windows 10 – features and tools for all developers
SK137 Surface Book 3 – GPU-accelerated application development

Posted in Uncategorized | Leave a comment

REST API for SPO using Postman

I have created a Postman collection to Access SPO using REST API.

More details are here

Posted in Uncategorized | Leave a comment

Download JSON data Cross Browser Support specially IE

My customer has a need to provide download links for underlying data of Power BI Embedded report. The embedding worked is all worked fine on the public site page. We also provided the download links to download underlying data in CSV and JSON format. All worked fine but the download links did not work in IE11. After searching on web found this article which was so helpful and worked with no issues.

Download JSON data in CSV format Cross Browser Support ->

I will not repeat what is discussed in the above blog. However my need was to support JSON format file download as well. So I used the following code as shown in the blog.

IEwindow.document.execCommand(‘SaveAs’, true, fileName + “.json”);

The issue is that the file type .json was not liked by IE so it never saved this file. I am guessing something to do with the code as a JSON file. To save you the trouble please DO NOT use .json instead use something like this.

IEwindow.document.execCommand(‘SaveAs’, true, fileName + “.json.TXT“);

That line was OK for IE and it worked like a charm. I hope it is helpful to you.


Posted in Uncategorized | Leave a comment

Download Power BI visual data as CSV or JSON

My customer had a requirement to download the Summary data of the report visual for Power BI embedded report.

I went to achieve this as a wrong path first. I hope you don’t do the same mistake.

The path I first took was to use the REST API below.
Datasets – Get Dataset ->

Push Datasets – Datasets GetTables ->

DO NOT use those APIs to get the dataset of an existing report. This will not work. These APIs only work for the data you pushed via API. The data set will show the API ACCESS as shown below.

PowerBIAPIAccess To download embedded report data use the Power BI client JS api to download.

Export Data->


Posted in Uncategorized | Leave a comment

Getting Group owners using MS Graph API in Power Automate

The call is made using the MS Graph API call.

Q:How does the MS Graph API work?

A: The following are the steps.

  1. Register an Azure AD app with the following API permission granted and consented.
Microsoft Graph (2)
     - Group.Read.All
     - User.Read.All

2. Using the REST API to get the Access Token.

POST<<<Guid for tenant>>>/oauth2/v2.0/token


grant_type=client_credentials&client_id=<<Azure AD App ID>>&client_secret=<<<the secret>>> &



“token_type”: “Bearer”,

“expires_in”: 3599,

“ext_expires_in”: 3599,

“access_token”: “<<blah blah long string>>”


  1. Using the above access token make a call to get the owners.


It will give the data response as the following.


"@odata.context": "$metadata#directoryObjects",
"value": [
"@odata.type": "#microsoft.graph.user",
"id": "12d7bb75-763b-4103-a367-e6fa9ca0edaa",
"businessPhones": [
"displayName": "MOD Administrator",
"givenName": "MOD",
"jobTitle": null,
"mail": "",
"mobilePhone": "555-555-5555",
"officeLocation": null,
"preferredLanguage": "en-US",
"surname": "Administrator",
"userPrincipalName": ""

Q: How to make such calls from Power Automate?

A: Here is the answer in the link below.

Posted in Uncategorized | Leave a comment

Microsoft Graph Security API

I have been working on the Microsoft Security Graph API to get the reports.
I have created a PostMan collection put it on the GitHub Repo. 

I have found following articles very useful.

Five cool security apps you can build using Microsoft Graph | BRK3073


Posted in Uncategorized | Leave a comment