You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/includes/azd/azd-login-ts.md
+19-9Lines changed: 19 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,30 +4,40 @@ ms.topic: include
4
4
ms.date: 02/21/2024
5
5
---
6
6
7
-
### Log in through GitHub Codespaces
7
+
### azd auth workaround
8
8
9
9
> [!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.
11
11
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.
13
13
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.
15
15
16
16
```azurecli-interactive
17
17
az login --scope https://graph.microsoft.com/.default
18
18
```
19
19
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:
21
21
22
-
1. In a new terminal window, type `curl` and paste your url.
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
25
35
curl <localhost>
26
36
```
27
37
28
-
1. If it works, code for a webpage saying "You have logged into Microsoft Azure!" appears.
0 commit comments