Open klin333 opened 3 months ago
In the azure demo, it suggests using a legacy endpoint. https://github.com/r-lib/httr/blob/df11e216f5e1a30f1bc8df8118e7cd983d9066f9/demo/oauth2-azure.r#L18-L24
It needs to be updated to the below, as outlined in Microsoft guide https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow
endpoint <- httr::oauth_endpoint( authorize = sprintf("https://login.windows.net/%s/oauth2/v2.0/authorize", tenant_id), # changed here by adding /v2.0/ access = sprintf("https://login.windows.net/%s/oauth2/v2.0/token", tenant_id))
In addition httr::oauth_endpoints("azure") gives "https://login.windows.net/common/oauth2/authorize", which is no longer supported since 2018 I believe.
httr::oauth_endpoints("azure")
I can confirm this change is required.
In the azure demo, it suggests using a legacy endpoint. https://github.com/r-lib/httr/blob/df11e216f5e1a30f1bc8df8118e7cd983d9066f9/demo/oauth2-azure.r#L18-L24
It needs to be updated to the below, as outlined in Microsoft guide https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow
In addition
httr::oauth_endpoints("azure")
gives "https://login.windows.net/common/oauth2/authorize", which is no longer supported since 2018 I believe.I can confirm this change is required.