View AssignGraphRights.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$graphScope = "LearningContent.ReadWrite.All" | |
$servicePrincipalObjectId = "Enter object ID of Logic App here" | |
$TenantID = "contoso.onmicrosoft.com" | |
Install-Module Microsoft.Graph | |
Connect-MgGraph -Scope “AppRoleAssignment.ReadWrite.All”,”Application.Read.All” -tenantId $TenantID | |
$graph = Get-MgServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" | |
$graphAppRole = $graph.AppRoles | ? Value -eq $graphScope | |
View newcontent.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"additionalTags": [ | |
"Teams Meetings" | |
], | |
"contentWebUrl": "https://alexholmeset.blog/2023/01/25/asdfasdf/", | |
"contributor": "Alexander Holmeset", | |
"description": "Put a description here if you have.", | |
"duration": "PT20M", | |
"format": "Blog", | |
"isActive": true, |
View contentprovider.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"displayName": "AlexHolmeset.blog", | |
"squareLogoWebUrlForDarkTheme": "https://s.w.org/style/images/about/WordPress-logotype-wmark.png", | |
"longLogoWebUrlForDarkTheme": "https://s.w.org/style/images/about/WordPress-logotype-wmark.png", | |
"squareLogoWebUrlForLightTheme": "https://s.w.org/style/images/about/WordPress-logotype-wmark.png", | |
"longLogoWebUrlForLightTheme": "https://s.w.org/style/images/about/WordPress-logotype-wmark.png", | |
"isEnabled": true, | |
"loginWebUrl": "" | |
} |
View TripletexUsersProjectsHours.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Authentication | |
$consumerToken = "xxxxxx" | |
$employeeToken = "xxxxxx" | |
#Add your HTTP Trigger URIs from the cloud flows here: | |
$AddURI = "xxxxx" | |
$ReadURI = "xxxxx" | |
$UpdateURI = "xxxxxx" |
View UpdateDataverse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "object", | |
"properties": { | |
"RowID": { | |
"type": "string" | |
}, | |
"Hours": { | |
"type": "string" | |
} | |
} |
View ReadDataverse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "object", | |
"properties": { | |
"TimesheetEntryID": { | |
"type": "string" | |
} | |
} | |
} |
View AddingDataverse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "object", | |
"properties": { | |
"ProjectID": { | |
"type": "string" | |
}, | |
"EmployeeName": { | |
"type": "string" | |
}, | |
"EmployeeID": { |
View CalendarActivityReport.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$TenantId = "xxxxxxxx" | |
$ClientID = "xxxxxxxxx" | |
$ClientSecret = "xxxxxxx" | |
function Get-MSGraphAppToken{ | |
<# .SYNOPSIS | |
Get an app based authentication token required for interacting with Microsoft Graph API | |
.PARAMETER TenantID | |
A tenant ID should be provided. | |
.PARAMETER ClientID |
View TripletexProjects.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ProjectsURL = "https://tripletex.no/v2/project?from=0" | |
$Projects = (Invoke-RestMethod -Method Get -uri $ProjectsURL -Headers $Header).values |
View TripletexToken.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Authentication | |
$consumerToken = "Enter your consumer token here" | |
$employeeToken = "enter your employee token here" | |
#Expiration date of the authorization toke you generate is set to 1 day from now. | |
$expirationDate = get-date ((get-date).Adddays(+1)) -format "yyyy-MM-dd" | |
$uri = "https://tripletex.no/v2/token/session/:create?consumerToken=$consumerToken&employeeToken=$employeeToken&expirationDate=$expirationDate" | |
#Get token and create header. | |
$token = ((Invoke-RestMethod -Method PUT -Uri $uri -ContentType "application/JSON").value).token | |
$user = '0' |
NewerOlder