Skip to content

Instantly share code, notes, and snippets.

Avatar

Your Azure Coach your-azure-coach

View GitHub Profile
@your-azure-coach
your-azure-coach / BlobStorage.cs
Last active Aug 13, 2020
Managed Identity code snippets
View BlobStorage.cs
using Azure.Storage.Blobs; //v12.4.3
var blobClient = new BlobClient(
new Uri($”https://{_storageAccountName}.blob.core.windows.net/{_blobContainerName}/msi-{Guid.NewGuid()}.txt”),
credential
);
var testFileStream = File.OpenRead(_testFilePath);
await blobClient.UploadAsync(testFileStream, true);
testFileStream.Close();
@your-azure-coach
your-azure-coach / aad-apply-role-assignments.ps1
Last active Aug 21, 2020
Scripting Azure AD application role assignments for users and applications
View aad-apply-role-assignments.ps1
param (
[string] $TenantId,
[string] $ConfigFilePath
)
$ErrorActionPreference = "Stop"
Write-Host Start Azure AD role assignment script
Write-Host "-Tenant Id:" $TenantId -ForegroundColor Gray
Write-Host "-Config File Path:" $ConfigFilePath -ForegroundColor Gray
You can’t perform that action at this time.