79116719

Date: 2024-10-23 07:02:16
Score: 1.5
Natty:
Report link

Connect to Azure Account

Connect-AzAccount

Create the Azure AD application

$appName = "MyTestingApp" $app = New-AzADApplication -DisplayName $appName -IdentifierUris "https://myapp.com"

Add a client secret

$secret = New-AzADAppCredential -ApplicationId $app.ApplicationId -EndDate (Get-Date).AddYears(1)

Define the permission ID for Mail.Send

$permissionId = "a0e0c2c0-6b4c-4c98-bcd8-15e7995d8f2b" # Mail.Send permission ID

Add the Mail.Send permission to the application

$resourceId = "00000003-0000-0000-c000-000000000000

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Filler text (0.5): 000000000000
  • Low reputation (1):
Posted by: waheed khan