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
//See below for a replacement of "ClientSecretCredential". | |
//For a full sample showcasing "ManagedIdentityCredential" see https://github.com/Azure-Samples/active-directory-dotnetcore-daemon-v2/tree/master/6-Call-OwnApi-ManagedIdentity | |
// Config json (can be programatic too) | |
/* | |
{ | |
"AzureAd": { | |
"Instance": "https://login.microsoftonline.com/", | |
"TenantId": "[Enter here the tenantID or domain name for your Azure AD tenant]", |
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
using Microsoft.Extensions.Caching.Memory; | |
using Microsoft.Extensions.Options; | |
using Microsoft.Identity.Client; // Microsoft.Identity.Client nuget package | |
using Microsoft.Identity.Web.TokenCacheProviders.InMemory; // Microsoft.Identity.Web.TokenCache nuget package | |
internal class Program | |
{ | |
private static async Task Main(string[] args) | |
{ | |
TokenAcquirer tokenAcquirer = new TokenAcquirer(); |
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
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Hello, World!"); | |
} | |
} |
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
// This already exists, no changes | |
class NetworkRequest | |
{ | |
public string Url; | |
public string Method; | |
public string Body; | |
public Dictionary<string, string> Headers; | |
} |
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
# 1. One time setup: install GH CLI https://cli.github.com/ | |
# 2. Update $issue_to_clone and $target_repos variables | |
# 3. Manually update the project if needed (e.g. Customer Trust). Labels should be automatically cloned. | |
# Config - step 1 | |
$issue_to_clone = "https://github.com/AzureAD/microsoft-authentication-library-for-java/issues/757" | |
$repo_java = 'https://github.com/AzureAD/microsoft-authentication-library-for-java/' | |
$repo_go = 'https://github.com/AzureAD/microsoft-authentication-library-for-go/' | |
$repo_py = 'https://github.com/AzureAD/microsoft-authentication-library-for-python/' |
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
using System; | |
using System.Diagnostics.Tracing; | |
namespace ConsoleApp2.p4 | |
{ | |
/// <summary> | |
/// With Global PII setting. | |
/// </summary> | |
public class Prototype4 | |
{ |
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
using System; | |
using System.Diagnostics.Tracing; | |
using Windows.Security.Authentication.Web.Core; | |
namespace ConsoleApp2 | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
Console.WriteLine("Hello World!"); | |
//WellKnownSidType sid = WellKnownSidType.; | |
//FileSystemRights rights = FileSystemRights.FullControl; | |
//AccessControlType controlType = AccessControlType.Allow; | |
FileSecurity security = new FileSecurity(); | |
var rights = FileSystemRights.Read | FileSystemRights.Write; | |
var adminIdentifier = new SecurityIdentifier(WellKnownSidType.BuiltinAdministratorsSid, null); |
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
using System; | |
using System.Net; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
namespace ConsoleApp2 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- | |
This file defines properties which would be understood by the SonarQube Scanner for MSBuild, if not overridden (see below) | |
By default the MSBuild.SonarQube.Runner.exe picks-up a file named SonarQube.Analysis.xml in the folder it | |
is located (if it exists). It is possible to use another properties file by using the /s:filePath.xml flag | |
The overriding strategy of property values is the following: | |
- A project-specific property defined in the MSBuild *.*proj file (corresponding to a SonarQube module) can override: | |
- A property defined in the command line (/d:propertyName=value) has which can override: | |
- A property defined in the SonarQube.Analysis.xml configuration file [this file] which can override: |