Skip to content

Commit c6b8c6e

Browse files
authored
Updates to login docs (login step, Entra branding) (#1574)
* Login updates * Revert dash change * Assume AZURE_TENANT_ID is set * Bring back legit Matt changes
1 parent 0196e73 commit c6b8c6e

File tree

7 files changed

+54
-49
lines changed

7 files changed

+54
-49
lines changed

app/backend/core/authentication.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def get_auth_setup_for_client(self) -> dict[str, Any]:
8484
"msalConfig": {
8585
"auth": {
8686
"clientId": self.client_app_id, # Client app id used for login
87-
"authority": self.authority, # Directory to use for login https://learn.microsoft.com/azure/active-directory/develop/msal-client-application-configuration#authority
87+
"authority": self.authority, # Directory to use for login https://learn.microsoft.com/entra/identity-platform/msal-client-application-configuration#authority
8888
"redirectUri": "/redirect", # Points to window.location.origin. You must register this URI on Azure Portal/App Registration.
8989
"postLogoutRedirectUri": "/", # Indicates the page to navigate after logout.
9090
"navigateToLoginRequestUrl": False, # If "true", will navigate back to the original request location before processing the auth code response.
@@ -100,10 +100,10 @@ def get_auth_setup_for_client(self) -> dict[str, Any]:
100100
# Scopes you add here will be prompted for user consent during sign-in.
101101
# By default, MSAL.js will add OIDC scopes (openid, profile, email) to any login request.
102102
# For more information about OIDC scopes, visit:
103-
# https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent#openid-connect-scopes
103+
# https://learn.microsoft.com/entra/identity-platform/permissions-consent-overview#openid-connect-scopes
104104
"scopes": [".default"],
105105
# Uncomment the following line to cause a consent dialog to appear on every login
106-
# For more information, please visit https://learn.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow#request-an-authorization-code
106+
# For more information, please visit https://learn.microsoft.com/entra/identity-platform/v2-oauth2-auth-code-flow#request-an-authorization-code
107107
# "prompt": "consent"
108108
},
109109
"tokenRequest": {
@@ -211,7 +211,7 @@ async def get_auth_claims_if_enabled(self, headers: dict) -> dict[str, Any]:
211211
try:
212212
# Read the authentication token from the authorization header and exchange it using the On Behalf Of Flow
213213
# The scope is set to the Microsoft Graph API, which may need to be called for more authorization information
214-
# https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow
214+
# https://learn.microsoft.com/entra/identity-platform/v2-oauth2-on-behalf-of-flow
215215
auth_token = AuthenticationHelper.get_token_auth_header(headers)
216216
# Validate the token before use
217217
await self.validate_access_token(auth_token)
@@ -225,13 +225,13 @@ async def get_auth_claims_if_enabled(self, headers: dict) -> dict[str, Any]:
225225
raise AuthError(error=str(graph_resource_access_token), status_code=401)
226226

227227
# Read the claims from the response. The oid and groups claims are used for security filtering
228-
# https://learn.microsoft.com/azure/active-directory/develop/id-token-claims-reference
228+
# https://learn.microsoft.com/entra/identity-platform/id-token-claims-reference
229229
id_token_claims = graph_resource_access_token["id_token_claims"]
230230
auth_claims = {"oid": id_token_claims["oid"], "groups": id_token_claims.get("groups", [])}
231231

232232
# A groups claim may have been omitted either because it was not added in the application manifest for the API application,
233233
# or a groups overage claim may have been emitted.
234-
# https://learn.microsoft.com/azure/active-directory/develop/id-token-claims-reference#groups-overage-claim
234+
# https://learn.microsoft.com/entra/identity-platform/id-token-claims-reference#groups-overage-claim
235235
missing_groups_claim = "groups" not in id_token_claims
236236
has_group_overage_claim = (
237237
missing_groups_claim

app/frontend/src/authConfig.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface AuthSetup {
2727
msalConfig: {
2828
auth: {
2929
clientId: string; // Client app id used for login
30-
authority: string; // Directory to use for login https://learn.microsoft.com/azure/active-directory/develop/msal-client-application-configuration#authority
30+
authority: string; // Directory to use for login https://learn.microsoft.com/entra/identity-platform/msal-client-application-configuration#authority
3131
redirectUri: string; // Points to window.location.origin. You must register this URI on Azure Portal/App Registration.
3232
postLogoutRedirectUri: string; // Indicates the page to navigate after logout.
3333
navigateToLoginRequestUrl: boolean; // If "true", will navigate back to the original request location before processing the auth code response.
@@ -42,7 +42,7 @@ interface AuthSetup {
4242
* Scopes you add here will be prompted for user consent during sign-in.
4343
* By default, MSAL.js will add OIDC scopes (openid, profile, email) to any login request.
4444
* For more information about OIDC scopes, visit:
45-
* https://docs.microsoft.com/azure/active-directory/develop/v2-permissions-and-consent#openid-connect-scopes
45+
* https://learn.microsoft.com/entra/identity-platform/permissions-consent-overview#openid-connect-scopes
4646
*/
4747
scopes: Array<string>;
4848
};
@@ -81,7 +81,7 @@ export const msalConfig = authSetup.msalConfig;
8181
* Scopes you add here will be prompted for user consent during sign-in.
8282
* By default, MSAL.js will add OIDC scopes (openid, profile, email) to any login request.
8383
* For more information about OIDC scopes, visit:
84-
* https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent#openid-connect-scopes
84+
* https://learn.microsoft.com/entra/identity-platform/permissions-consent-overview#openid-connect-scopes
8585
*/
8686
export const loginRequest = authSetup.loginRequest;
8787

docs/deploy_features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ By default, the deployed Azure web app will have no authentication or access res
123123

124124
Alternatively, you can manually require authentication to your Azure Active Directory by following the [Add app authentication](https://learn.microsoft.com/azure/app-service/scenario-secure-app-authentication-app-service) tutorial and set it up against the deployed web app.
125125

126-
To then limit access to a specific set of users or groups, you can follow the steps from [Restrict your Azure AD app to a set of users](https://learn.microsoft.com/azure/active-directory/develop/howto-restrict-your-app-to-a-set-of-users) by changing "Assignment Required?" option under the Enterprise Application, and then assigning users/groups access. Users not granted explicit access will receive the error message -AADSTS50105: Your administrator has configured the application <app_name> to block users unless they are specifically granted ('assigned') access to the application.-
126+
To then limit access to a specific set of users or groups, you can follow the steps from [Restrict your Microsoft Entra app to a set of users](https://learn.microsoft.com/entra/identity-platform/howto-restrict-your-app-to-a-set-of-users) by changing "Assignment Required?" option under the Enterprise Application, and then assigning users/groups access. Users not granted explicit access will receive the error message -AADSTS50105: Your administrator has configured the application <app_name> to block users unless they are specifically granted ('assigned') access to the application.-
127127

128128
## Enabling login and document level access control
129129

0 commit comments

Comments
 (0)