From f7cd8ae8fa59eba3c7cfe1166900327352ba2738 Mon Sep 17 00:00:00 2001 From: Enrico Candino Date: Thu, 15 Feb 2024 09:42:23 +0100 Subject: [PATCH] added DeviceAuthURL to AzureADEndpoint The Microsoft identity platform supports the device authorization grant: https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-device-code This PR adds the "https://login.microsoftonline.com/{tenant}/oauth2/v2.0/devicecode" DeviceAuthURL to the AzureADEndpoint. --- microsoft/microsoft.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/microsoft/microsoft.go b/microsoft/microsoft.go index 3ffbc57a6..13091d666 100644 --- a/microsoft/microsoft.go +++ b/microsoft/microsoft.go @@ -25,7 +25,8 @@ func AzureADEndpoint(tenant string) oauth2.Endpoint { tenant = "common" } return oauth2.Endpoint{ - AuthURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/authorize", - TokenURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/token", + AuthURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/authorize", + TokenURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/token", + DeviceAuthURL: "https://login.microsoftonline.com/" + tenant + "/oauth2/v2.0/devicecode", } }