Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions 1-Authentication/4-sign-in-device-code/App/authConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ const { LogLevel } = require('@azure/msal-node');
*/
const msalConfig = {
auth: {
clientId: 'Enter_the_Application_Id_Here', // 'Application (client) ID' of app registration in Azure portal - this value is a GUID
authority: `https://Enter_the_Tenant_Subdomain_Here.ciamlogin.com/`, // Replace the placeholder with your tenant subdomain
// clientId: 'Enter_the_Application_Id_Here', // 'Application (client) ID' of app registration in Azure portal - this value is a GUID
// authority: `https://Enter_the_Tenant_Subdomain_Here.ciamlogin.com/`, // Replace the placeholder with your tenant subdomain
clientId: '3f1e48cc-a053-4702-adbe-5918e8247d6a', // 'Application (client) ID' of app registration in Azure portal - this value is a GUID
authority: `https://TrialTenantkwFwHYij.ciamlogin.com/`, // Replace the placeholder with your tenant subdomain
},
system: {
loggerOptions: {
Expand Down
3 changes: 3 additions & 0 deletions 1-Authentication/4-sign-in-device-code/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const getTokenDeviceCode = (clientApplication) => {
* Device Code Request. For more information visit:
* https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_node.html#devicecoderequest
*/
console.log(clientApplication.acquireTokenByDeviceCode);
console.log('called get token');
const deviceCodeRequest = {
...loginRequest,
deviceCodeCallback: (response) => {
Expand All @@ -28,6 +30,7 @@ const getTokenDeviceCode = (clientApplication) => {
return response;
})
.catch((error) => {
console.log(error);
return error;
});
}
Expand Down
186 changes: 186 additions & 0 deletions 1-Authentication/4-sign-in-device-code/App/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion 1-Authentication/4-sign-in-device-code/App/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"license": "ISC",
"dependencies": {
"@azure/msal-node": "^1.17.2"
"@azure/msal-node": "^2.9.2"
}
}