Skip to content

Commit cd40bd2

Browse files
Revise workaround steps to add more clarity.
1 parent 9f2de35 commit cd40bd2

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

articles/aks/includes/azd/azd-login-ts.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,40 @@ ms.topic: include
44
ms.date: 02/21/2024
55
---
66

7-
### Log in through GitHub Codespaces
7+
### azd auth workaround
88

99
> [!IMPORTANT]
10-
> Certain Azure security policies cause conflicts when used to sign in with `azd auth login`. As a workaround, you can perform a curl request to the localhost url you were redirected to after you logged in.
10+
> If you are using an out-of-network virtual machine, or GitHub Codespace, certain Azure security policies cause conflicts when used to sign in with `azd auth login`. As a workaround, you can perform a curl request to the localhost url you were redirected to after you logged in.
1111
12-
The workaround requires the Azure CLI for authentication. If you don't have it or aren't using GitHub Codespaces, install the [Azure CLI][install-azure-cli].
12+
This workaround requires you to have the [Azure CLI][install-azure-cli] and run `azd auth login` prior.
1313

14-
1. Inside a terminal, login with Azure CLI.
14+
1. Open a terminal window and log in with the Azure CLI through the browser. Use the `az login` command with the `--scope` parameter set to `https://graph.microsoft.com/.default`. This is required to workaround certain device related policies that may cause the issue.
1515

1616
```azurecli-interactive
1717
az login --scope https://graph.microsoft.com/.default
1818
```
1919
20-
1. Copy the "localhost" URL from the failed redirect.
20+
You should be redirected to an authenthication page in a new tab to create a browser access token:
2121
22-
1. In a new terminal window, type `curl` and paste your url.
22+
```output
23+
https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize?clientid=<your_client_id>.
24+
```
2325
24-
```azurecli-interactive
26+
1. Copy the localhost URL of the webpage after signing in with `azd auth login`.
27+
28+
```output
29+
http://localhost:<port>/?code=<token>
30+
```
31+
32+
1. In a new terminal window, use the following curl request to log in. Make sure you replace the `<localhost>` placeholder with the localhost URL you copied in the previous step.
33+
34+
```console
2535
curl <localhost>
2636
```
2737
28-
1. If it works, code for a webpage saying "You have logged into Microsoft Azure!" appears.
38+
A successful login outputs an HTML webpage:
2939
30-
```html
40+
```output
3141
<!DOCTYPE html>
3242
<html>
3343
<head>

0 commit comments

Comments
 (0)