File tree Expand file tree Collapse file tree
1-Authentication/6-sign-in-node-cli-app/App Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ import { LogLevel } from '@azure/msal-node';
77 */
88export const msalConfig = {
99 auth : {
10- clientId : '2e9d2f02-7eb8-4cc3-9bd8-5e67eff7b80b ' ,
11- authority : 'https://TrialTenantkwFwHYij .ciamlogin.com/' ,
10+ clientId : 'Enter_the_Application_Id_Here ' ,
11+ authority : 'https://Enter_the_Tenant_Subdomain_Here .ciamlogin.com/' ,
1212 } ,
1313 system : {
1414 loggerOptions : {
@@ -29,9 +29,4 @@ export const msalConfig = {
2929 */
3030export const loginRequest = {
3131 scopes : [ ] ,
32- } ;
33-
34- // module.exports = {
35- // msalConfig: msalConfig,
36- // loginRequest: loginRequest,
37- // };
32+ } ;
Original file line number Diff line number Diff line change @@ -30,14 +30,12 @@ const pca = new PublicClientApplication(msalConfig);
3030
3131const acquireToken = async ( ) => {
3232 const accounts = await pca . getTokenCache ( ) . getAllAccounts ( ) ;
33- console . log ( accounts ) ;
3433 if ( accounts . length === 1 ) {
3534 const silentRequest = {
3635 account : accounts [ 0 ] ,
3736 } ;
3837
3938 return pca . acquireTokenSilent ( silentRequest ) . catch ( ( e ) => {
40- console . log ( e ) ;
4139 if ( e instanceof InteractionRequiredAuthError ) {
4240 return pca . acquireTokenInteractive ( tokenRequest ) ;
4341 }
@@ -48,7 +46,6 @@ const acquireToken = async () => {
4846 } ) ;
4947 return Promise . reject ( 'Multiple accounts found. Please select an account to use.' ) ;
5048 } else {
51- console . log ( pca ) ;
5249 return pca . acquireTokenInteractive ( tokenRequest ) ;
5350 }
5451} ;
You can’t perform that action at this time.
0 commit comments