Skip to content

Instantly share code, notes, and snippets.

View anoopt's full-sized avatar

Anoop T anoopt

View GitHub Profile
const clientId: string = core.getInput('clientId', { required: true });
const clientSecret: string = core.getInput('clientSecret', { required: true });
const tenantId: string = core.getInput('tenantId', { required: true });
const start: string = core.getInput('start');
const end: string = core.getInput('end');
const subject: string = core.getInput('subject', { required: true });
const body: string = core.getInput('body', { required: true });
const userEmail: string = core.getInput('userEmail', { required: true });
//* auth - auth.ts
private cca: ConfidentialClientApplication;
constructor(clientId: string, clientSecret: string, tenantId: string) {
this.config = {
auth: {
clientId,
clientSecret,
authority: `https://login.microsoftonline.com/${tenantId}/`
name: 'Microsoft Graph Event Workflow'
on:
pull_request:
branches:
- main
jobs:
create-event:
runs-on: ubuntu-latest
steps:
@anoopt
anoopt / Set-PageHeader-Author-Byline.ps1
Last active May 5, 2021 20:46
A script to set the author byline of a modern SharePoint page using PnP PowerShell
Param(
[Parameter(mandatory = $true)]
[string]$SiteUrl,
[Parameter(mandatory = $true)]
[string]$PageName,
[Parameter(mandatory = $true)]
[string]$UserEmail
)
function Set-PageHeaderAuthor {
@anoopt
anoopt / 1. View format.png
Last active April 7, 2021 16:50
Multi choice column + links
1. View format.png
@anoopt
anoopt / 1 - ShowAnimatedDialog.tsx
Created March 24, 2021 19:01
Rendering the PnP SPFx Animated Dialog control
import * as React from 'react';
import { FC, useEffect, useState } from 'react';
import { useBoolean } from '@uifabric/react-hooks';
import styles from './SampleAnimatedDialog.module.scss';
import { IHelloWorldProps } from './IHelloWorldProps';
import { PrimaryButton } from 'office-ui-fabric-react/lib/Button';
import { DialogType } from 'office-ui-fabric-react/lib/Dialog';
import { AnimatedDialog } from "@pnp/spfx-controls-react/lib/AnimatedDialog";
import { sp } from "@pnp/sp";
@anoopt
anoopt / UpdateQuickLinks.js
Created March 16, 2021 12:39
Update links in the SharePoint modern "Quick Links" webpart using PnP JS and SP editor extension
@anoopt
anoopt / 1 - PaginateData.module.scss
Last active March 7, 2021 02:34
React Paginate + SPFx
@import "~office-ui-fabric-react/dist/sass/References.scss";
$themePrimary: "[theme:themePrimary, default:#0078d7]";
$themeDark: "[theme:themeDark, default:#005a9e]";
$themeLighter: "[theme:themeLighter, default:#deecf9]";
$themeNeutralLighter: "[theme: neutralLighter, default: #f4f4f4]";
$themeNeutralTertiaryAlt: "[theme: neutralTertiaryAlt, default: #c8c8c8]";
.paginationRow {
.paginate {
@import '~office-ui-fabric-react/dist/sass/References.scss';
$themePrimary: '[theme:themePrimary, default:#0078d7]';
.animatedDialogTitleContainer{
text-align: center;
i {
font-size: 52px;
color: $themePrimary;
}
@anoopt
anoopt / devcontainer.json
Created October 9, 2020 10:43
Devcontainer.json file needed for GitHub codespaces SPFx develoment
{
"name": "SPFx",
"build": {
"dockerfile": "Dockerfile"
},
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},