Skip to content

Commit

Permalink
Removing allowestsrnonmsi query parameter (#6582)
Browse files Browse the repository at this point in the history
Fix for
#6557
Removing allowestsrnonmsi query parameter

---------

Co-authored-by: trwalke <[email protected]>
  • Loading branch information
trwalke and trwalke authored Oct 31, 2023
1 parent b561834 commit 9ed331c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Removing allowestsrnonmsi query parameter",
"packageName": "@azure/msal-common",
"email": "[email protected]",
"dependentChangeType": "patch"
}
5 changes: 2 additions & 3 deletions lib/msal-common/src/authority/Authority.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1205,12 +1205,11 @@ export class Authority {
regionalMetadata.authorization_endpoint,
azureRegion
);
// TODO: Enquire on whether we should leave the query string or remove it before releasing the feature

regionalMetadata.token_endpoint =
Authority.buildRegionalAuthorityString(
regionalMetadata.token_endpoint,
azureRegion,
Constants.REGIONAL_AUTH_NON_MSI_QUERY_STRING
azureRegion
);

if (regionalMetadata.end_session_endpoint) {
Expand Down
1 change: 0 additions & 1 deletion lib/msal-common/src/utils/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export const Constants = {
IMDS_TIMEOUT: 2000,
AZURE_REGION_AUTO_DISCOVER_FLAG: "TryAutoDetect",
REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX: "login.microsoft.com",
REGIONAL_AUTH_NON_MSI_QUERY_STRING: "allowestsrnonmsi=true",
KNOWN_PUBLIC_CLOUDS: [
"login.microsoftonline.com",
"login.windows.net",
Expand Down
10 changes: 5 additions & 5 deletions lib/msal-common/test/authority/Authority.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ describe("Authority.ts Class Unit Tests", () => {
.replace(
"login.microsoftonline.com",
"westus2.login.microsoft.com"
)}/?allowestsrnonmsi=true`
)}/`
);
expect(authority.endSessionEndpoint).toEqual(
`${deepCopyOpenIdResponse.body.end_session_endpoint
Expand Down Expand Up @@ -661,7 +661,7 @@ describe("Authority.ts Class Unit Tests", () => {
.replace(
"login.microsoftonline.com",
"westus2.login.microsoft.com"
)}/?allowestsrnonmsi=true`
)}/`
);
expect(authority.endSessionEndpoint).toEqual(
`${deepCopyOpenIdResponse.body.end_session_endpoint
Expand Down Expand Up @@ -723,7 +723,7 @@ describe("Authority.ts Class Unit Tests", () => {
.replace(
"login.microsoftonline.com",
"westus2.login.microsoft.com"
)}/?allowestsrnonmsi=true`
)}/`
);
expect(authority.endSessionEndpoint).toEqual(
`${deepCopyOpenIdResponse.body.end_session_endpoint
Expand Down Expand Up @@ -778,7 +778,7 @@ describe("Authority.ts Class Unit Tests", () => {
.replace(
"login.microsoftonline.com",
"centralus.login.microsoft.com"
)}/?allowestsrnonmsi=true`
)}/`
);
expect(authority.endSessionEndpoint).toEqual(
`${deepCopyOpenIdResponse.body.end_session_endpoint
Expand Down Expand Up @@ -1153,7 +1153,7 @@ describe("Authority.ts Class Unit Tests", () => {
jwks_uri:
"https://login.microsoftonline.com/common/discovery/v2.0/keys",
token_endpoint:
"https://westus2.login.microsoft.com/common/oauth2/v2.0/token/?allowestsrnonmsi=true",
"https://westus2.login.microsoft.com/common/oauth2/v2.0/token/",
};

networkInterface.sendGetRequestAsync = (
Expand Down

0 comments on commit 9ed331c

Please sign in to comment.