This file contains hidden or 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
name: Build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest |
This file contains hidden or 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
#Get user by email | |
GET https://graph.microsoft.com/beta/users?$filter=startswith(mail,'geert') | |
Authorization: Bearer {{auth.response.body.access_token}} |
This file contains hidden or 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
# @name auth | |
POST https://login.microsoftonline.com/{{tenantId}}/oauth2/v2.0/token HTTP/1.1 | |
Content-type: application/x-www-form-urlencoded | |
grant_type=client_credentials | |
&client_id={{clientId}} | |
&client_secret={{clientSecret}} | |
&scope={{scope}} |
This file contains hidden or 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
"rest-client.environmentVariables": { | |
"$shared": {}, | |
"blogdemo":{ | |
"tenantId":"<<your aad tenant>>", | |
"clientId":"<<your client id>>", | |
"clientSecret":"<<your client secret>>", | |
"scope":"https%3A%2F%2Fgraph.microsoft.com%2F.default" | |
} | |
}, |
This file contains hidden or 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
import { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { AppRoutingModule } from './app-routing.module'; | |
import { AppComponent } from './app.component'; | |
import { MsalModule, MsalInterceptor } from '@azure/msal-angular'; | |
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http'; | |
import { DemoApiService } from './demoapi.service'; | |
export const protectedResourceMap:[string, string[]][]=[['https://localhost:44388/api/values', ['api://59b02905-8b6b-4665-a702-321e97392416/api-access']] ]; |
This file contains hidden or 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
public class Startup | |
{ | |
public Startup(IConfiguration configuration) | |
{ | |
Configuration = configuration; | |
} | |
public IConfiguration Configuration { get; } | |
// This method gets called by the runtime. Use this method to add services to the container. |
This file contains hidden or 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
let today = dependencies | |
| where timestamp between( now(-1d) .. now() ) | |
| where name == "CalculationCycle" | |
| project value , timestamp, hour=datepart("Hour",timestamp) | |
| summarize avg(value) by bin(hour,1) | |
| sort by hour asc; | |
let lastmonth = dependencies | |
| where timestamp between( now(-30d) .. now(-1d)) | |
| where name == "CalculationCycle" | |
| project value , timestamp, hour=datepart("Hour",timestamp) |
This file contains hidden or 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
var telemetry = new DependencyTelemetry | |
{ | |
Type = "type", | |
Name = nameof(CalculationCycle) | |
}; | |
telemetry.Start(); | |
telemetry.Context.Operation.Id = telemetry.Id; | |
telemetry.Context.Operation.ParentId = telemetry.Id; |
This file contains hidden or 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
resources: | |
containers: | |
- container: dotnet-geert | |
image: 'microsoft/dotnet:2.1-sdk' | |
options: -v /home/vsts/NuGet/Cache:/NuGet/Cache | |
env: | |
NUGET_PACKAGES: '/NuGet/Cache' | |
pool: 'Geerts-Linux-Agents' | |
container: dotnet-geert |
This file contains hidden or 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
resources: | |
containers: | |
- container: dotnet-geert | |
image: 'microsoft/dotnet:2.1-sdk' | |
pool: 'Hosted Ubuntu 1604' | |
container: dotnet-geert | |
variables: | |
buildConfiguration: 'Release' |
NewerOlder