{"_id":"@microsoft/microsoft-graph-client","_rev":"235-8a9b172171e878e4c0d45f772c75b4e1","name":"@microsoft/microsoft-graph-client","dist-tags":{"Preview":"1.7.1-spfx","spfx":"1.7.2-spfx","restPreview":"4.0.0-RestPreview.1","latest":"3.0.7"},"versions":{"0.3.1":{"name":"@microsoft/microsoft-graph-client","version":"0.3.1","_id":"@microsoft/microsoft-graph-client@0.3.1","maintainers":[{"name":"microsoft","email":"npmjs@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"39e2cd545a51e760c21654c87a108b06297f8652","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-0.3.1.tgz","integrity":"sha512-9vXgVduQCyfoCzDkOdkcexEAk3EWzMoMeBkC2qDHFzeS/7lktzcknHePAvCSbuMi+RSJyrbq9GBpPPPzefyfoQ==","signatures":[{"sig":"MEYCIQCEHsD8G7CadqdoBjhWw/zxQA5tmbJrzkSXQ8G0SehIoAIhAIYJYGO97M5PgDZmgifMjOqesuow0/FBqIgm/4t90zhl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/src/index.js","_from":".","files":["lib/"],"types":"./lib/src/index.d.ts","_shasum":"39e2cd545a51e760c21654c87a108b06297f8652","gitHead":"77e374d8cd287e966d49a1c62804c078fdd3d03d","scripts":{"test":"mocha lib/test","build":"tsc && node node-browserify.js > lib/graph-js-sdk-web.js"},"typings":"lib/src/index","_npmUser":{"name":"microsoft","email":"npmjs@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.10","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.4","dependencies":{"superagent":"~3.3.0"},"devDependencies":{"mocha":"^3.2.0","browserify":"^13.1.0","typescript":"^2.1","@types/mocha":"^2.2.34","@types/superagent":"^2.0.36"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client-0.3.1.tgz_1484272538222_0.9654558685142547","host":"packages-12-west.internal.npmjs.com"}},"0.3.2":{"name":"@microsoft/microsoft-graph-client","version":"0.3.2","_id":"@microsoft/microsoft-graph-client@0.3.2","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"221880b3d22cea4eeaf9e4082a367f8dc082fdea","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-0.3.2.tgz","integrity":"sha512-t2pzkNSRU2m1BxvQPUxhH4PXDhauKP8ib644tYXdj5GMLiAhp/gtm1JLFHuyGXb50+qGBpOMWf4Wz6NrjsnnBw==","signatures":[{"sig":"MEYCIQCK5yIo+wykyWJ1VoaeZc/IOZhd3BssYQNDU7NjIJtGpAIhAIuKQDh6hf1D/qiotOb73Oc1RgZfY/lUvtTpoDVJyfD/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/src/index.js","_from":".","files":["lib/"],"types":"./lib/src/index.d.ts","_shasum":"221880b3d22cea4eeaf9e4082a367f8dc082fdea","gitHead":"e2e107ff25665ab115f255b9e6480d6b24d50681","scripts":{"test":"mocha lib/test","build":"tsc && node node-browserify.js > lib/graph-js-sdk-web.js"},"typings":"lib/src/index","_npmUser":{"name":"dan-silver","email":"dansil@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"superagent":"~3.3.0"},"devDependencies":{"mocha":"^3.2.0","browserify":"^13.1.0","typescript":"^2.1","@types/mocha":"^2.2.34","@types/superagent":"^2.0.36"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client-0.3.2.tgz_1484333306604_0.22054378874599934","host":"packages-18-east.internal.npmjs.com"}},"0.3.3":{"name":"@microsoft/microsoft-graph-client","version":"0.3.3","_id":"@microsoft/microsoft-graph-client@0.3.3","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"af3092ecd1d20262b244d2f92df2779ca820a97a","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-0.3.3.tgz","integrity":"sha512-GFPAJQTujC5RqtnmOb+8xedicDRSbmO6Dq0RrWb5v4Kxp1sKieTq7mUrtSmICky9k5r2I1H/LE3N7wQcwQswCw==","signatures":[{"sig":"MEUCIQDug+6TWslVxAU4kSYXFiKcfKVZVtu5iGwmkLXzScM9QgIgU1uqwMr8ZNhFEdgqKoLKLJz/ERTAeU6/5fY6q4bq69E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/src/index.js","_from":".","files":["lib/"],"types":"./lib/src/index.d.ts","_shasum":"af3092ecd1d20262b244d2f92df2779ca820a97a","gitHead":"225f3fa9a5bb5760a3793b7c36e91354085969a3","scripts":{"test":"mocha lib/test","build":"tsc && node node-browserify.js > lib/graph-js-sdk-web.js"},"typings":"lib/src/index","_npmUser":{"name":"dan-silver","email":"dansil@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"4.0.5","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"7.4.0","dependencies":{"superagent":"~3.3.0"},"devDependencies":{"mocha":"^3.2.0","browserify":"^13.1.0","typescript":"^2.1","@types/mocha":"^2.2.34","@types/superagent":"^2.0.36"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client-0.3.3.tgz_1489448784326_0.6331112338230014","host":"packages-12-west.internal.npmjs.com"}},"0.4.0":{"name":"@microsoft/microsoft-graph-client","version":"0.4.0","_id":"@microsoft/microsoft-graph-client@0.4.0","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"63216ab70e892ebcd4c35e2945cf6b25b14ac0db","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-0.4.0.tgz","integrity":"sha512-C3a/WsB8UY3OnPtC0QI9f6iJOZls2/pIWFp2BPI1scGgS4si/IRiPLfKtJgoqixoC7mPrzk01qU1JWK5xFMvBQ==","signatures":[{"sig":"MEQCICNS8UMlrNwz2/M7S684E0bXhP00rXhJ6WY4OWe4f1faAiA7r7hLqAmDsEKVHcjOZ/0PEJCYu2G+AuqusNBNxoRiDA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/src/index.js","_from":".","files":["lib/"],"types":"./lib/src/index.d.ts","_shasum":"63216ab70e892ebcd4c35e2945cf6b25b14ac0db","gitHead":"48dce8ee83693453b69a783a00c9844a604fd519","scripts":{"test":"mocha lib/test","build":"tsc && node node-browserify.js > lib/graph-js-sdk-web.js"},"typings":"lib/src/index","_npmUser":{"name":"dan-silver","email":"dansil@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"4.0.5","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"7.4.0","dependencies":{"superagent":"~3.3.0"},"devDependencies":{"mocha":"^3.2.0","browserify":"^13.1.0","typescript":"^2.2.1","es6-promise":"^4.1.0","@types/mocha":"^2.2.34","@types/superagent":"^2.0.36"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client-0.4.0.tgz_1489599439848_0.5617587266024202","host":"packages-12-west.internal.npmjs.com"}},"0.4.1":{"name":"@microsoft/microsoft-graph-client","version":"0.4.1","_id":"@microsoft/microsoft-graph-client@0.4.1","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"a848aa363953b1fecd65159d8519b17559752172","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-0.4.1.tgz","integrity":"sha512-GjcuW24/nrBGf2Z3uc9WjqHXHcrXzetuyWw40i3t2LnPc1kkBrK9E4SuR+JexBYsLm31xYt3zveKS+nfeToUbg==","signatures":[{"sig":"MEUCIARogf/xh+GULm276G6EORHB2iU8tutbOnGx8sJ7mS8oAiEAnmudfx+nK6FnswpJFGY7Mojz5qzmbwbml5VShMvH4PE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/src/index.js","_from":".","files":["lib/"],"types":"./lib/src/index.d.ts","_shasum":"a848aa363953b1fecd65159d8519b17559752172","gitHead":"9ff9eae4317f298770b494ceebc526f2d30671ac","scripts":{"test":"mocha lib/test","build":"tsc && node node-browserify.js > lib/graph-js-sdk-web.js"},"typings":"lib/src/index","_npmUser":{"name":"dan-silver","email":"dansil@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"4.0.5","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"7.4.0","dependencies":{"superagent":"^3.5.2","es6-promise":"^4.1.0"},"devDependencies":{"mocha":"^3.2.0","browserify":"^13.1.0","typescript":"^2.2.1","@types/mocha":"^2.2.34","@types/superagent":"^2.0.36"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client-0.4.1.tgz_1490286991342_0.11662963777780533","host":"packages-18-east.internal.npmjs.com"}},"1.0.0":{"name":"@microsoft/microsoft-graph-client","version":"1.0.0","_id":"@microsoft/microsoft-graph-client@1.0.0","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"1c0aab2f428c7cbac0d44f265a8127b2586c380d","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.0.0.tgz","integrity":"sha512-urg0alDEHXCkN94cDxO6mf0RVcy+9MXYmYJpY/oAz2YXY6RFlGTQxfLdNQhTDXKRf3RvG4MuLfZwJWlWX/iRuA==","signatures":[{"sig":"MEYCIQDMcOz1/62ZVbptGuCjJMPD71McJmPOQ9CEfWCMHJjEPQIhAOtwC+FruCi/baraATXbCf6zjgkA6wfE3Y45fvxqYja4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/src/index.js","_from":".","files":["lib/"],"types":"./lib/src/index.d.ts","_shasum":"1c0aab2f428c7cbac0d44f265a8127b2586c380d","gitHead":"2719513160fc03e8808e69a308350e75abf383c6","scripts":{"test":"mocha lib/spec/core","build":"tsc && node node-browserify.js > lib/graph-js-sdk-web.js","test:types":"tsc --p spec/types && mocha spec/types"},"typings":"lib/src/index","_npmUser":{"name":"dan-silver","email":"dansil@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"4.2.0","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"7.8.0","dependencies":{"superagent":"^3.5.2","es6-promise":"^4.1.0"},"devDependencies":{"mocha":"^3.2.0","browserify":"^13.1.0","typescript":"^2.2.1","@types/mocha":"^2.2.34","@types/superagent":"^2.0.36"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client-1.0.0.tgz_1494377693634_0.13656163681298494","host":"packages-12-west.internal.npmjs.com"}},"1.1.0":{"name":"@microsoft/microsoft-graph-client","version":"1.1.0","_id":"@microsoft/microsoft-graph-client@1.1.0","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in common.ts. If you change it here, also change it there.","dist":{"shasum":"d6b91cc05de7920f01b51d3ce3d5faa8f7afd959","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.1.0.tgz","fileCount":31,"integrity":"sha512-sDgchKZz1l3QJVNdkE1P1KpwTjupNt1mS9h1T0CiP+ayMN7IeFKfElB8IYtxFplNalZTmEq+iqoQFqUVpVMLfQ==","signatures":[{"sig":"MEUCIFT+hzsLkq2qCD4EBFF1ep6q+S36G5Wh+d5MoVuuSOsdAiEAjc/ZOF4oMUYjIx+3wBHFvF3vRZftVRGof8wG8QCea1g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":144574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbYWjBCRA9TVsSAnZWagAABVgP/ikvfxuYF/5bi3whVJJW\nFAU0MDrHB7gQDmNARtCfe6F8qyY2xDSVAdCQS5nnoCohvYCjwqn7jPjtl7zw\n1NNva/fYYXX/37EVZk7d8Wrel4nhEkApdxLvqrBAc6m6jYxbDR0kU/MTivky\nhfgDZEJnH21UkX+DQ4YvJwle/RFVctOn/SMomIekgPMRN4/xd5n63gZ3CNdQ\nBc+V5xN9oksYXh6xzV0V7cmddUHIIaa8NhzLelh1Hm895bdSkCGYOaRIBMw+\nE5k6ogED+BrQkApyuBXCI1/6MHwg+RumuYP2Q1j6GBq08djAmXMnZUfmXArK\ncIIZjJb6f2HU2EpB/V6gzkJwIsgRxL30oaGUywrWKzKPvVflqm3AOC+4JpqB\naj9TcuBK/fZrEWdk/eRPzXgIZXxZFPDiwIeOCrbTvJSQiHoQDhnPlzyRKEiI\nFuUOUqKBcUyeGF7eRN16VdEFI/dz5yDhOzT65LR1KXLLVguVLxZH1LkrBQtn\nEf+jQSXS2OEzhlbHkG1Qatn+qeyouTD1Ej7KqIk+SSkOLJkKLLw7LQ3iW6Os\nXzpsOMHMbUu81TREI7jvvYcArPUsfl4z36c4GJCeGxdQ5G8ACsiOGjpBJNjv\np+Kw91TOBSHAfzBiQxKgEZVXGxwf8bSvNYFZmRCO1OORyyNSh4rOcBorBFIg\nw6cY\r\n=/us9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","files":["lib/"],"types":"./lib/src/index.d.ts","gitHead":"acedfc13484c3dab6ab6da94df0d77ffd73d96d5","scripts":{"test":"mocha lib/spec/core","build":"tsc && node node-browserify.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js","test:types":"tsc --p spec/types && mocha spec/types"},"typings":"lib/src/index","_npmUser":{"name":"muthurathinam","email":"mumuthus@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.1.0","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"8.11.1","dependencies":{"es6-promise":"^4.1.0","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^5.2.0","uglify-js":"^3.4.5","browserify":"^13.1.0","typescript":"^2.2.1","@types/node":"^9.4.0","@types/mocha":"^5.2.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.1.0_1533110464884_0.9689351728284223","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@microsoft/microsoft-graph-client","version":"1.2.0","_id":"@microsoft/microsoft-graph-client@1.2.0","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in common.ts. If you change it here, also change it there.","dist":{"shasum":"d358be4acbfa7e6713e541ce9af808e680f34b9b","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.2.0.tgz","fileCount":36,"integrity":"sha512-iKwcLp0O3urIHaF4jL2NTtPoZFWR6ABAkZ/yBcBT9iEABqzI/qg1LnFaQnLUDzOKKey7MvndwU5CvLKiUWRu7Q==","signatures":[{"sig":"MEUCIQCjngVcSEAKnVfz5kN0jGGERsqNRANp4gxUFlQaLEmEMwIgaon99bXlMwn/dvxOo4+B5L2knCdlx+ePdF4NprHUiCI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":200776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdk2UCRA9TVsSAnZWagAAe/sQAJ50/6ochvP1MIL30kcP\nMLRC27clH4QZXlkCHHSGKr8C7d2ynVvysLuRzxhy3KcDwllcCslGGoAZb3RR\nvxdt8Xsic8idBE/msXntv5egR4kRZePz0mCk7k4HkQo0xJ0Drrfbx6g9K3UV\npBXDVqq/GAtvQGD4hLYDpg/29QrR4vw2LYbX9Bjygj4ByiaWtVc5Z5UZ0sOr\nOQjbeWyrTAtiLZa2R62us7OyBsCuR4JgVdk2myMRSdXEtyDxQgOa8Llacohh\nh0SaEYcVjk3o588cX21pEmlmbhjyYYgW4IgWdfYRqIAZrVQCX5TAnk2V0D0e\nb8Rmel/9k9rmk3mJx76NmvXR6gvhmmOK2NqjEc2NwX8xokfMc9lGwkMNp5dD\njmn8zwAXnthJ16hxVRIb4BDS9EY2Kxq9js99X3xIY0oyyC1kf9UYqrKAvHJ/\n+KPr3A2UH/mjQymhdcb5ReEeYBkRQJBTpsK5XxStw60JG+tlRg3tuszEqsph\n036tIJDi5/OddDcKnHBEdr7el3OnfetjkCQnX0+6DvuWyGqqIiqMtCauO3BP\n/hKCsg/HR4t8C8cdPk+cWMLm+o/G2YTlJ5goBpKaesp7zkwlmiuDvdb2/FeI\ndaQo6GzEOHSsvx/ihi0CknwXWiuuIm0+ZneQbBU5H13z+igxR+0Ru72+JI0h\njCL1\r\n=C4BE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","files":["lib/"],"types":"./lib/src/index.d.ts","gitHead":"318feb603f621736f75192081f0862ea887d61d4","scripts":{"test":"mocha lib/spec/core","build":"npm run compile && npm run rollup-core && npm run rollup-with-vendor","compile":"tsc","build-core":"npm run compile && npm run rollup-core","test:types":"tsc --p spec/types && mocha spec/types","rollup-core":"node core-browserify.js > lib/graph-js-sdk-core.js && uglifyjs lib/graph-js-sdk-core.js --output lib/graph-js-sdk-core.js","build-with-vendor":"npm run compile && npm run rollup-with-vendor","rollup-with-vendor":"node node-browserify.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js"},"typings":"lib/src/index","_npmUser":{"name":"muthurathinam","email":"mumuthus@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.1.0","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"8.11.1","dependencies":{"es6-promise":"^4.1.0","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^5.2.0","uglify-js":"^3.4.5","browserify":"^13.1.0","typescript":"^2.2.1","@types/node":"^9.4.0","@types/mocha":"^5.2.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.2.0_1534479763459_0.2431700904099381","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@microsoft/microsoft-graph-client","version":"1.3.0","_id":"@microsoft/microsoft-graph-client@1.3.0","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in common.ts. If you change it here, also change it there.","dist":{"shasum":"02f7bd0f0d55f2cea735fa7992048ede40e82a14","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.3.0.tgz","fileCount":54,"integrity":"sha512-LUIZdr8LWKwUAJuV7GKSaexQBfXObqwe4EkQUVg9u9u3X0YZZnWROIE8/EsiuA7882fn73oROra6ilBuipMLiw==","signatures":[{"sig":"MEQCIEzzSUyVWaU282/YkIR3VAWpxxYWNh5zttPjZvPVfZUcAiBHlglU8OZ7lSaGYU6timUSWYI8oZ/m7uxFWtSZR6XOzw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":355022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbpc0HCRA9TVsSAnZWagAAaj8P/iUHgnwZtR5kEYBUhkUf\nYXIIRZfAt8+dwV9WPoujJLoucok8K/BZ2jNWXxmZEpz9OAak9F7W06gatLhn\nht9iUxYymCL0nHwXubES+FsIAEyGYgKupn5GeYdAeI/CYgbZap0EMNj5TIjB\nn0NDFZv3DA6wxoGiu69dKrDIZ74PrbkiWYncBW4YfRPDY7uoKhbPOlmzfLJy\nVr4h6T6eHvTdF5Pdd2sBsaug/IhBWYZJ+7dxBgmZsGZdmAUftDOIV+2ACXRs\nN1M5K6GmN6nTwFKNJ6kOkttI7XPhb2JDDuvb6fK2zwjaoM9wl9CJDYBa0qUM\nGHQcA5K0YYk1Ud1qFFqLUPCm6UKHBHCfe/hoEllMmxD6a1LDOFwOX1IvtJY1\n/CPqii2OQPt6t6M5VaC9UyuSA/BRhM1LZU5d3UIstKt+zwVzPZgeXdmUJaN/\nInR5tA0572yUBfA3GLjr1NnmFGndkZne4WkgdytiRg+bkfaMDfm5pf1kEvX/\nqIfHXkTHumvRhsAubLLvuh2CfkjZw7nHt+bcI1JBk4lHjSj06QStAZ7QEsEK\nrdRiLV/7nQS2VZ5hLQfrptX1UiVjM0khp1T9ERMo2guP4KO5G9fV8bVB0rzt\nK+rGbdIe7nHyCT4KL9dzmvd8vmPySKbVsAk3cXvE0fmCczx5QxnL6spZ1ow7\nGJA8\r\n=5xLO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","gitHead":"43207f8b46643a84994986d5f8715847cd89d42b","scripts":{"test":"mocha lib/spec/core","build":"npm run compile && npm run rollup-core && npm run rollup-with-vendor","compile":"tsc","build-core":"npm run compile && npm run rollup-core","test:tasks":"tsc -p spec && mocha spec/tasks","test:types":"tsc -p spec && mocha spec/types","rollup-core":"node core-browserify.js > lib/graph-js-sdk-core.js && uglifyjs lib/graph-js-sdk-core.js --output lib/graph-js-sdk-core.js","test:content":"tsc -p spec && mocha spec/content","build-with-vendor":"npm run compile && npm run rollup-with-vendor","rollup-with-vendor":"node node-browserify.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js"},"typings":"lib/src/index","_npmUser":{"name":"muthurathinam","email":"mumuthus@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"5.6.0","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"8.11.2","dependencies":{"es6-promise":"^4.1.0","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^5.2.0","uglify-js":"^3.4.5","browserify":"^13.1.0","typescript":"^2.2.1","@types/node":"^9.4.0","@types/mocha":"^5.2.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.3.0_1537592582438_0.9664975436851932","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@microsoft/microsoft-graph-client","version":"1.4.0","_id":"@microsoft/microsoft-graph-client@1.4.0","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in common.ts. If you change it here, also change it there.","dist":{"shasum":"de485e20d344121d0fa692567c7af0483169e579","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.4.0.tgz","fileCount":57,"integrity":"sha512-dX7053APLpIaGMGqJrDjBVX7ZO+vntKTvyB1WIy4WpC8qE3qdE68MDOq5Vv6JPG879KygPiCH2ex5RCAK+OR0Q==","signatures":[{"sig":"MEUCIQD+2wa4QX++q6U5AokCUVaJ4YiC5f+tKrTW4+lAr4fevQIgU72+cYxO8WGbYNoI2HC4wKjAgsgWxaJlncryRaKHbSc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":383623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSAUaCRA9TVsSAnZWagAA8ZEP/2smgbAogF3kEsLB9Y74\no0CHzsPqnqzsMUwq5SfYqMR4kwa6cHMBNLFxjj21/zJOGhoX/964rtSYQAX+\nv0iiw3OLI8xSUQ+bN9FwtdbmH4/gkvDIocaSxZhbvr/5TyznkLEyzyd+ENOO\n8A6o+4v287EkUDpIg78VWgVmvnZZmKHzDNtf/sHL5/85Jy3pnl/hnq56cE39\nymEsWIHQXeFL8XF/a6ecEG7vh3348PKpNyOIEZJ/6UwOH9LohxnlG7RXN5MR\n8hAgza8R3tmGyt9Ea6iHYiO1VN+kISjCQFqzJr98EJgoHDZm6+Oatvg1DtiV\nKZoq6PMO4As+asx8CU/ITgqj7kzdUoTmO+VNSavG/QKrz7R9VsCeRhvrdRwK\n9Hvw9WYnJrglwXWd4sF3y+GCZlHh7cl58P7jZP3fNOzyQj1DJPBUCWZsmujV\nEqBaNzlblBEDPfewCtYAUwM6LAu59mEw8WcKzJQAcHOOgOZsPXHaqxtMhCtT\nYbZrpw3jrNI7N6NFrksigRdUvCSGn9pwbsSWRnq0897nrJhMm7tK2qt1OtpG\nhdn+aXn3gr27OnAa60MDXnhdoF5VlASeZGF+V9IOYSHHWDS/IasbFoJYCZfS\nUuMH+tCgCNLBO2nO1zFpFwmImV+1BgXstnq5mS7soiVywfDszdFkHGso+Ftv\nmySe\r\n=FyXm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","gitHead":"90005843fb6800f6c4dffcee9ee323fb2b35b2c0","scripts":{"test":"mocha lib/spec/core","build":"npm run compile && npm run rollup-core && npm run rollup-with-vendor","compile":"tsc","build-core":"npm run compile && npm run rollup-core","test:tasks":"tsc -p spec && mocha spec/tasks","test:types":"tsc -p spec && mocha spec/types","rollup-core":"node core-browserify.js > lib/graph-js-sdk-core.js && uglifyjs lib/graph-js-sdk-core.js --output lib/graph-js-sdk-core.js","test:content":"tsc -p spec && mocha spec/content","build-with-vendor":"npm run compile && npm run rollup-with-vendor","rollup-with-vendor":"node node-browserify.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js"},"typings":"lib/src/index","_npmUser":{"name":"muthurathinam","email":"mumuthus@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.1.0","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"8.11.1","dependencies":{"es6-promise":"^4.1.0","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^5.2.0","uglify-js":"^3.4.5","browserify":"^13.1.0","typescript":"^2.2.1","@types/node":"^9.4.0","@types/mocha":"^5.2.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.4.0_1548223770050_0.7087067089465096","host":"s3://npm-registry-packages"}},"1.5.2":{"name":"@microsoft/microsoft-graph-client","version":"1.5.2","_id":"@microsoft/microsoft-graph-client@1.5.2","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.","dist":{"shasum":"71856368d5ddb7ccd9d526d8d08ff940e95d4193","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.5.2.tgz","fileCount":144,"integrity":"sha512-lUsFLQMmi94r5+Eabmi5FBvlmxsqHPzdqm4suegFmcmnOI5+4OCLADORkRFRJXcWzTKB2ypR9x/mGv7f3r9DzA==","signatures":[{"sig":"MEQCIBJMEnHg5KLcVYxVhu7NlEwh6YfhwXDvrjy4jzgusxu+AiBk+Z2QVYUZVB1hXwkCJrQIjq1u2pAH2kfRw2XryCtWAQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":622316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcf+gtCRA9TVsSAnZWagAAeV0P/j4HQj8jKJ6ccYPHZGqS\nojx54Zxm2RYj+QZrcFzdpyw+R5Ol72azY2Y7mstEzZmkCqWr0+GH9t/G2HY1\nTwX+4NGTF/rQmPLE8DupJnLnOfuxrEJZpVCc2jAzdYO79jRLStrfkcFNMYYp\nKVFXFdCDNeoR9u4jCsWi0bCGu14GqYTo55eXofIMuMlG8HqmLPY9Ju1W2UlL\nR8IwAVptbUG2K6tWqSUMhPnGGaR77qyOKawela5kJxK6wxNHW8DZHKZWjzPN\nt22mwe0ybdkM+fNORj64AXI6Bv6XmgEzUMek2xeLtolVLPObvjHtIvzO8BH+\nVAxpOS51aFRd4EQ1gQqniGwEL5wE69UL3aBTd0DIOWCTO9A04xR9rYn0ed9X\n6IVTpFORBqM7fbUWmuMQmU91nS/3jyRpboQaHKbqIwTRdJDqkQeE2KIUnPRP\ntf2TikGiiCJlCHETBRc/PabQQPg3EYA0ul9pEtoX+wA6RHB4CN1KtQSurdQO\noLIvxMFeUNNlBjrz4xOcjQ9spB6Jt3ErAkw/y+tuzMCTaZm9rrZJ8YLGdljT\nwCMTQNjx3q80jdAEGGiCi49GhtrGkYuoEjLV/Q9J+w3eSg/NMOTdr8Sc9yNq\nWiD3qLQ2vnVGEv+vvjGHw7DqKLsf7Ro8sPHDkACk0rf9ZPL+JcmAxoNfdxDx\nH6hP\r\n=WhYn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","gitHead":"22d1bad4c5c10d390989a51e1c425846e21193f0","scripts":{"lint":"tslint --project ./tsconfig.json -c tslint.json","test":"npm run compile && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run compile && npm run web:js && npm run core:js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","web:js":"node browserify-with-dependencies.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js","compile":"tsc","core:js":"node browserify.js > lib/graph-js-sdk-core.js && uglifyjs ./lib/graph-js-sdk-core.js --output ./lib/graph-js-sdk-core.js","prepack":"npm install && npm run build && npm run test","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","test:core":"tsc -p spec && mocha spec/core","format:css":"prettier --write \"**/*.css\"","test:tasks":"tsc -p spec && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc -p spec && mocha spec/content","test:workload":"tsc -p spec && mocha spec/development/workload","test:middleware":"tsc -p spec && mocha spec/middleware","test:development":"tsc -p spec && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"muthurathinam","email":"mumuthus@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"5.6.0","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"8.11.2","dependencies":{"tslib":"^1.9.3","es6-promise":"^4.2.6","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","msal":"^0.2.4","husky":"^1.3.1","mocha":"^6.0.2","tslint":"^5.13.0","prettier":"^1.16.4","uglify-es":"^3.3.9","browserify":"^16.2.3","typescript":"^3.3.3333","@types/node":"^11.9.5","lint-staged":"^8.1.4","@types/mocha":"^5.2.6","tslint-config-prettier":"^1.18.0","@types/isomorphic-fetch":"0.0.35"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.5.2_1551886380446_0.6079770446079265","host":"s3://npm-registry-packages"}},"1.6.0-Preview.1":{"name":"@microsoft/microsoft-graph-client","version":"1.6.0-Preview.1","_id":"@microsoft/microsoft-graph-client@1.6.0-Preview.1","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.","dist":{"shasum":"eb1fa3bf73e61791f5392c3a12bf75065204752e","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.6.0-Preview.1.tgz","fileCount":144,"integrity":"sha512-QaArkgV3BFznT45qWPc+mrxrQvilM2G766pzXZznlV5n6NUQ/bpoYgbY6iIUIGWvKeoTadSgudtedoZA2xnTxg==","signatures":[{"sig":"MEYCIQDpjQac+Z1bcJ0dHSO/idswpyOQOKqEg9pLp3Kq+xRoPAIhALM32hBksCC0nc1wazFi/RCTh8PIQX0r+ELG+32Kv90e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":627892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctqN4CRA9TVsSAnZWagAA2AIP/0Y/eJ6ep+mQIVkHykq9\ndKwa+oO10Vr40X/h5vtR348nYtLUxDX1YrKULA+fNckZ3A3aut0kS+A5WzeH\nl9IBQK8CZ8VgK2Q+QCsVds9W7f+o912AMLesDetW4OgYaG3wiLCz+Z2BSnuP\nPvUnSmly0wnJa77JwE8jgR89iKqVA6qqfZtiYwYyKtXpZpkNPrdfzQvGhlCz\n4K3iOVwHK7TtyQbED6k7lJpfFdzGJGAjVyu+mN8JAjOO5TJ7zladE3ZZ2ux3\nVpkXrJ/ul54HaniafCBJJXJ4CL7lHz5G/5sO/Hi5PppulrmDWHjlEtvOn8Uz\nkUQWXSL1a6S0h+qscnLqkLmHobTILRSRUWeabTOP+gqlAVnzk931S7SDbLh5\nEULNMiP90Y+FONAxGtFOSqufyUBdluiYIIQ0XOLtFKA1pad80SZXB6cAlTiW\noT7ppsEkA1Lao4sSxyshmdRmWEr88THN1lCIZGpi9cULen7X76WGXvv29ikE\nW/sJMFWtJGDViSwg6fkIIaAWkDQJRCEB530VMN9H1hS6/1Dpp+AOYEGEfEn1\nQlE16cvZxeNIZeAjzfhEXl0VkcUkCJVG08fRCeb24asddZfAxdtcCgBiz4d3\nvhshxoJO0m55ULr1YUoDaqQzM8EY/UIZ2PVQrlhfENH5JR25bmp/bxxmhITJ\ncUY2\r\n=Mnf+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module.\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude `lib/graph-js-sdk-web.js` in your page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-web.js\"></script>\r\n```\r\n\r\nIncase if your application ships with [es6-promise](https://www.npmjs.com/package/es6-promise) and [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch) just use `lib/graph-js-sdk-core.js`\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-core.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([MSALAuthenticationProvider](src/MSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new Msal.UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, graphScopes);\r\n```\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { MSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/MSALAuthenticationProvider\";\r\n\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MSALAuthenticationProvider(userAgentApplication, scopes);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/APIMethods.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Angular.js sample using the JavaScript client library](https://github.com/microsoftgraph/angular-connect-sample)\r\n-   [Node.js sample using the JavaScript client library](https://github.com/microsoftgraph/nodejs-connect-sample)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","_shasum":"eb1fa3bf73e61791f5392c3a12bf75065204752e","gitHead":"efa8b45add7b33f57c81f13b467653f934c7e408","scripts":{"lint":"tslint --project ./tsconfig.json -c tslint.json","test":"npm run compile && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run compile && npm run web:js && npm run core:js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","web:js":"node browserify-with-dependencies.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js","compile":"tsc","core:js":"node browserify.js > lib/graph-js-sdk-core.js && uglifyjs ./lib/graph-js-sdk-core.js --output ./lib/graph-js-sdk-core.js","prepack":"npm install && npm run build && npm run test","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","test:core":"tsc -p spec && mocha spec/core","format:css":"prettier --write \"**/*.css\"","test:tasks":"tsc -p spec && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc -p spec && mocha spec/content","test:workload":"tsc -p spec && mocha spec/development/workload","test:middleware":"tsc -p spec && mocha spec/middleware","test:development":"tsc -p spec && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","es6-promise":"^4.2.6","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","msal":"^0.2.4","husky":"^1.3.1","mocha":"^6.0.2","tslint":"^5.13.0","prettier":"^1.16.4","uglify-es":"^3.3.9","browserify":"^16.2.3","typescript":"^3.3.3333","@types/node":"^11.9.5","lint-staged":"^8.1.4","@types/mocha":"^5.2.6","tslint-config-prettier":"^1.18.0","@types/isomorphic-fetch":"0.0.35"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.6.0-Preview.1_1555473271708_0.07839282086864174","host":"s3://npm-registry-packages"}},"1.6.0-Preview.2":{"name":"@microsoft/microsoft-graph-client","version":"1.6.0-Preview.2","_id":"@microsoft/microsoft-graph-client@1.6.0-Preview.2","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.","dist":{"shasum":"ccb9d6cd4f4f51347742f766893ca03713ff087e","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.6.0-Preview.2.tgz","fileCount":283,"integrity":"sha512-DHm+W4LfoU/gdo2rdjQnlR9Qd0AjJp1bxD+bGzITUvtJjGenlewlcBr4393oZKfNWfH7ZrZtw3FWJhISz2yPyQ==","signatures":[{"sig":"MEYCIQCjKpE5kxFpEZ+RhOI/uCMWq9ezeFglclpXzDu0KhlNFgIhAL7Shw1SsFTb2YevY2GsmHnBHBllqJ73wQQ8+wjpmQ04","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":960110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvTzRCRA9TVsSAnZWagAAm4gP/RYXn9DaM59Mb/67Qqw4\nppJk/6F4QLMXHZuKQOmGEl2fVqnoRCNH0VUqPMv5Tgyt1Xg6iylp8vyJZ1mU\nBC+FQusEw65Zr4hRJcxW18M86LPHlKPkVKskdXHEUcmKQXiRaYR9MbaTp6Ua\nr9jolIW4AaTVsIeNAVHC/ygCHpKCo8mOgcrRWnkUBc5K8+4avyZo6WFzKOt1\nsugD4NucZWoiAu4bBQqzXvhZXBzzWq5R4PV75mGU+zpVDyMC+wuneHIxSie5\nCImYn1K3QJkIylS5ch2n/kRpLlEFscLpFX1W27OfcVmWwwB3L/98s/iX9DCy\n12ZKOBQG4BS0dPAw+LOjVychecAeYmAk2uMYME7/y10nzJHckqgvxShRr5au\nwzCCp+ayfChOeleAWNfX5mVq6EvwYfs3k22VpoF4VMdblacCNKpp9JsokSQ5\n8+XK2g55JLG03W+mW5kAg8ccXOe8MhLGHW04fGODFf8ePZ24VXrn4GWUPsLO\n1nHfL3nBsmLwOzLLBkLd8pfGPkCI2S96cy602n0fWM0m+C1TTmwI98ER15I3\n9mQFfxh4KaX7MVFqsN3m2NdKTMhyPQBSz2TlI0rQk55/TMZgFuLInGLdzOoA\n7Yy8ZyFjzCmvS7nHibMyesoGzMUKpdYycL5yHFHFmkTY/z18EnDJeBQwv0X5\nSzyf\r\n=BqRI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module.\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude `lib/graph-js-sdk-web.js` in your page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-web.js\"></script>\r\n```\r\n\r\nIncase if your application ships with [es6-promise](https://www.npmjs.com/package/es6-promise) and [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch) just use `lib/graph-js-sdk-core.js`\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-core.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([MSALAuthenticationProvider](src/MSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new Msal.UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, graphScopes);\r\n```\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { MSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/MSALAuthenticationProvider\";\r\n\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MSALAuthenticationProvider(userAgentApplication, scopes);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/APIMethods.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Angular.js sample using the JavaScript client library](https://github.com/microsoftgraph/angular-connect-sample)\r\n-   [Node.js sample using the JavaScript client library](https://github.com/microsoftgraph/nodejs-connect-sample)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","_shasum":"ccb9d6cd4f4f51347742f766893ca03713ff087e","gitHead":"f1fdda94c1bc08e6e83db4d9ea8406f94e1928cc","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run build:cjs && npm run build:es && rollup -c && npm run web:js && npm run core:js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","web:js":"node browserify-with-dependencies.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js","core:js":"node browserify.js > lib/graph-js-sdk-core.js && uglifyjs ./lib/graph-js-sdk-core.js --output ./lib/graph-js-sdk-core.js","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","es6-promise":"^4.2.6","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","msal":"^0.2.4","husky":"^1.3.1","mocha":"^6.1.3","rollup":"^1.10.0","tslint":"^5.15.0","prettier":"^1.17.0","uglify-es":"^3.3.9","browserify":"^16.2.3","typescript":"^3.4.3","@types/node":"^11.13.4","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","rollup-plugin-terser":"^4.0.4","tslint-config-prettier":"^1.18.0","@types/isomorphic-fetch":"0.0.35"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.6.0-Preview.2_1555905744764_0.5876686092481258","host":"s3://npm-registry-packages"}},"1.6.0-Preview.3":{"name":"@microsoft/microsoft-graph-client","version":"1.6.0-Preview.3","_id":"@microsoft/microsoft-graph-client@1.6.0-Preview.3","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.","dist":{"shasum":"75b13abc40d63900332c3a2121278d519848feb5","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.6.0-Preview.3.tgz","fileCount":283,"integrity":"sha512-xIPZDA4fmNe7LeiCWO1uUBt6G8ejJtP9ynqpwgkTSiwAWON6xlqfcr+hgjLl/YCZWKLFq+ieuvnBz68sCZmauQ==","signatures":[{"sig":"MEUCICeuHsJjzwLJYp4MXk95F/zLpTDtbUo6z5onSKUhLrGcAiEA9uhE3v9RWVpCr1QOaRauH09ptAZ7BCWEFrAMNbQfiF0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":981221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwUcxCRA9TVsSAnZWagAAxVIP/iD96p1ayIubAgKWEnmz\n2gC37JNZYH8eOgYmBy/iEwpoRsyBy10D/3Tqqo1/bdVF86iBvYDsmv4S2ndO\nC0tjgfI8s5RwbtMYdpAjRtnsOagwSnABD+A5x1o293sgDuyZsY4exeqxqXED\nC20EIelwvPot8qzBFNqLrlQArRxCTSA/eL6rPlmCpD+XPY2a2wwY4ovzzX7i\nSdsQs3D3uw0s2OSKiYghEeTV2yQvndOFHMmiITVR+WqyH3XLJ+leMisppPzC\nCJJSPT875AX4iSbzgS9ZBxMSWI9df0KsDkRzMhaGYKvRfZbuZ5vptBx6IiER\nMB5A9jT8HHbm2zOjnATzCt+X9Z/aVu6zka/qK3pvR9A+2eYxmk5fGGT3hsqu\neFMRR+bCoAB5tzEakCMOnfTFvtERejwjd1pzqy0Au52A5wn2Stl3ybgoEPAR\nSXdIC9xI849uxMdtV4YfgFU+sKauD6/tTx+npeQkp2MXVgaLv5EhAWTycLTc\nLCQotrqYod5jCscxMxmCellCU+efd3cb62aTqTRmFmCRN4NTnicN+33JDP92\np5EkToK1UMcKTmVMQTu6MWQ2BvFFMi99HX17QL4PsQY6TEItrkNVEW4HYfd3\n8ADADiU04wsR/TN0mIncmhERtp0JYnwKKuLBlE8CQ/c2IQ05Y+Rk48TkoT3v\nmBvV\r\n=CauN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module.\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude `lib/graph-js-sdk-web.js` in your page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-web.js\"></script>\r\n```\r\n\r\nIncase if your application ships with [es6-promise](https://www.npmjs.com/package/es6-promise) and [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch) just use `lib/graph-js-sdk-core.js`\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-core.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([MSALAuthenticationProvider](src/MSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new Msal.UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, graphScopes);\r\n```\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { MSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/MSALAuthenticationProvider\";\r\n\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MSALAuthenticationProvider(userAgentApplication, scopes);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/APIMethods.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Angular.js sample using the JavaScript client library](https://github.com/microsoftgraph/angular-connect-sample)\r\n-   [Node.js sample using the JavaScript client library](https://github.com/microsoftgraph/nodejs-connect-sample)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","_shasum":"75b13abc40d63900332c3a2121278d519848feb5","gitHead":"4e3595609bffddd9e93e5f9a1c5d52816801a81a","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run build:cjs && npm run build:es && rollup -c && npm run web:js && npm run core:js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","web:js":"node browserify-with-dependencies.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js","core:js":"node browserify.js > lib/graph-js-sdk-core.js && uglifyjs ./lib/graph-js-sdk-core.js --output ./lib/graph-js-sdk-core.js","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","es6-promise":"^4.2.6","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","msal":"^0.2.4","husky":"^1.3.1","mocha":"^6.1.3","rollup":"^1.10.0","tslint":"^5.15.0","prettier":"^1.17.0","uglify-es":"^3.3.9","browserify":"^16.2.3","typescript":"^3.4.3","@types/node":"^11.13.4","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","rollup-plugin-terser":"^4.0.4","tslint-config-prettier":"^1.18.0","@types/isomorphic-fetch":"0.0.35"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.6.0-Preview.3_1556170545171_0.36257826769470647","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@microsoft/microsoft-graph-client","version":"1.6.0","_id":"@microsoft/microsoft-graph-client@1.6.0","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.","dist":{"shasum":"a5678eabf1dd5c25a70b55da9d89f1478325f29d","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.6.0.tgz","fileCount":283,"integrity":"sha512-jgOgWZOyrmFbeyiddCUOQ0Kd42JUz7x3F6de0iLlSxP2yT2xJlnhZGAtHPnJZgDS2KRBbPwuRd+dmiJdpOBMWQ==","signatures":[{"sig":"MEYCIQD9SA5guz+cSbToXcL+Ss7TQHxhKVIAv1/Bc0emJl7/GgIhAJYpZRbdCABzTTaBV4FkT57h5R51i1qlYUy58kfAXueF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":981201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcwYiaCRA9TVsSAnZWagAAmU4P/A98D7uZQfJrvPyFpMEa\nWTMwtQQ/tAloYgg6NkNVykyed2HBMs3H2zyq/cEnDLGOhoDbrSspXHvbYPPX\nL+W44HNpayfh1cRUuPvBNMrqOotGiCyc8fABVKD8435A9B6bgvX9q9gb8nwO\nDC4A8j6GT+eMHRYaR+Vn424Lq0WoInnVhm7DxU/Oc2fWkc+ZIsdamVQR07Qx\neMFv8Yf/O6UmShJOLCo0bqKx6ZFrZQH8CHPlFK6/MTE0HuQ77BYBppZg7MUn\nGpBQ16U2QHHooFRqsgD01jRJUcyVj8t3HbmcoFLXqZd/I1y4GvtQ5KuvoEW0\n9C63dLyW5bicq6rDvQB5TJd9yhSsnRBirKdUTFQVd/IcItPhIYBq3j7FBM7M\nxZsDuDmkwRgI1tSp+6ATUxuTVaxPchiS8cM6JzJcpHE8XU8nNGMiWSSEJPDn\nS9JzNFj2jW7HWuQe2cTRgO27hcalXI6wgf2JhEZfuccA8ky4dQzLtebo71v+\nMUL2IHa/Cv2NP+6jgAsYd895ARFfkcZkUchv0VtgwWytVj39y7Qa/7GyFz/i\n6LnNOEjXa4Ntkl9fvqoM3vpvK1cPY4+G50vjT+48+7ZJe/6bvlrU3hcjuUj5\nc5f0MV88vGJ6QP6qpSq1Ree8AnLdoErDQlLY/sSbbjUCOqL8p/uki1B9YB06\nVBT1\r\n=de3v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","_shasum":"a5678eabf1dd5c25a70b55da9d89f1478325f29d","gitHead":"430d92d4d10ae7405fcd9139dba7c1474da4e103","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run build:cjs && npm run build:es && rollup -c && npm run web:js && npm run core:js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","web:js":"node browserify-with-dependencies.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js","core:js":"node browserify.js > lib/graph-js-sdk-core.js && uglifyjs ./lib/graph-js-sdk-core.js --output ./lib/graph-js-sdk-core.js","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","es6-promise":"^4.2.6","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","msal":"^0.2.4","husky":"^1.3.1","mocha":"^6.1.3","rollup":"^1.10.0","tslint":"^5.15.0","prettier":"^1.17.0","uglify-es":"^3.3.9","browserify":"^16.2.3","typescript":"^3.4.3","@types/node":"^11.13.4","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","rollup-plugin-terser":"^4.0.4","tslint-config-prettier":"^1.18.0","@types/isomorphic-fetch":"0.0.35"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.6.0_1556187289570_0.7863520970990352","host":"s3://npm-registry-packages"}},"1.7.0-Preview.1":{"name":"@microsoft/microsoft-graph-client","version":"1.7.0-Preview.1","_id":"@microsoft/microsoft-graph-client@1.7.0-Preview.1","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.","dist":{"shasum":"a40a9cd855d0f103474c91bdce959ac53e1a681f","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.0-Preview.1.tgz","fileCount":295,"integrity":"sha512-6u+eDSsPi7jZhalFdF1NSEt/I5WatTuLLJKwpcNvcMWEvhpRjotzcA8mywh9tiLlMVvrg372ypF2VME1W0ilPA==","signatures":[{"sig":"MEYCIQDaQpHl2fOSSpgOLl6FOHsmjeF6TsC0lthpQ1zAbt1u0gIhAJMuFpN4Vkfn3ZzCcn7QZtfSFVlb9LlpPb2Dk8rNj1AW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1030911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcxowsCRA9TVsSAnZWagAAvjYP+waZgfDW7Mh6cWvAndON\nY56Fwx6rwlxQtY4QWh8twgo6m83KdkF9kzQq8bwftwXwF4WPjDUd21jFVFTY\njio5tpYiZMx9RJWPF46qSct8AJF6MYEgH6P1c4zdD41ILz13zex6JNkQpAjy\noFqH9Hiy+XSz0XRLyOi498MIZqzcAvpvA/h8N4tt8darr/CH+neItLsV9/Ek\nfIIZocKDpaUby0nN6OXQDUaoJGfYyKuFfhHwVCCijX4WQHcIIomX1orzLkF6\nYeCDw1P5G4d/EtssdyNqgKrtzclNBbzhG/Qj8e+jjo/pnlfePxQQuWwUK3I1\nExYDFcvAHa+Z1OjEU+IBycWIDKWRabEh5A6pdbtx/61C9Qs6om5rmNhGwMWs\nzDIUpLLA3YmOic7QkdS/EyuW+XgEKO+YjS1+ea3jLEbnKsjajghN4SOARmlB\nNX9jTOhQfYmbEHBLerBjUqMdilklwMVLAixq4kNVSR35GvuB8DudofLQ8vyo\ndlMxXoypb1P9i2jbN6Ez5qXZe8h98tRmnb8e/DxFBLBU23F8Vja5Cxi+PzhP\nuvsxpHlJMN3/aQZWSjKiY2Kp3A9z4uvHi9h2VWBhbMISZqSeQiLND+kJ5cQK\njbimiLLDdQeF6xmFbFIijvmLbLKNY5VVjbw0WNpADaSOIqyTjU/uf1ajRLlq\nKH+l\r\n=8kHM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module.\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude `lib/graph-js-sdk-web.js` in your page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-web.js\"></script>\r\n```\r\n\r\nIncase if your application ships with [es6-promise](https://www.npmjs.com/package/es6-promise) and [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch) just use `lib/graph-js-sdk-core.js`\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-core.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([MSALAuthenticationProvider](src/MSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new Msal.UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, graphScopes);\r\n```\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { MSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/MSALAuthenticationProvider\";\r\n\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MSALAuthenticationProvider(userAgentApplication, scopes);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/APIMethods.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Angular.js sample using the JavaScript client library](https://github.com/microsoftgraph/angular-connect-sample)\r\n-   [Node.js sample using the JavaScript client library](https://github.com/microsoftgraph/nodejs-connect-sample)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","_shasum":"a40a9cd855d0f103474c91bdce959ac53e1a681f","gitHead":"bce44e471757243ad25ac07234d54ca1e8f443b8","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run build:cjs && npm run build:es && rollup -c && npm run web:js && npm run core:js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","web:js":"node browserify-with-dependencies.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js","core:js":"node browserify.js > lib/graph-js-sdk-core.js && uglifyjs ./lib/graph-js-sdk-core.js --output ./lib/graph-js-sdk-core.js","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","es6-promise":"^4.2.6","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","msal":"^0.2.4","husky":"^1.3.1","mocha":"^6.1.3","rollup":"^1.10.0","tslint":"^5.15.0","prettier":"^1.17.0","uglify-es":"^3.3.9","browserify":"^16.2.3","typescript":"^3.4.3","@types/node":"^11.13.4","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","rollup-plugin-terser":"^4.0.4","tslint-config-prettier":"^1.18.0","@types/isomorphic-fetch":"0.0.35"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.7.0-Preview.1_1556515884063_0.5253910342128707","host":"s3://npm-registry-packages"}},"1.7.0-Preview.2":{"name":"@microsoft/microsoft-graph-client","version":"1.7.0-Preview.2","_id":"@microsoft/microsoft-graph-client@1.7.0-Preview.2","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.","dist":{"shasum":"2c5f8e511f2ebe9c9a77fe8b3179044fd394369a","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.0-Preview.2.tgz","fileCount":295,"integrity":"sha512-aFAzw1mDb68YnWUtLzf0qSXmAoGPxqVl4J9RgiP0K0qw29JUQWM2gHqRGCYJG3IuAzbKH4pKuLuFEheKOyRygg==","signatures":[{"sig":"MEYCIQDttfCvNvwu6IkcSiGy/SnJXUkBeYYltMeJEZTE+gIsjgIhANElFHSmRQtuDhcS7wVoernp44xUHSucwQHEcVnDm8kI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1024494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1R6kCRA9TVsSAnZWagAA+ZMP/iW6ZUZv3i++vmgxHJ5V\nvMXFBLoSgfI7fuNEnT98dw37c+fDE4HqLV5ceQlOw12RwVk0PwFcHFruh5Y6\n360JQttS97EoMl6ubf3s4cSCXswf14bojjO53friu5oTY1s8dwLSlKvT+P1H\nDnYMIlf2HUKoSbCDyrheCM7TRwOsrzZc42AZWvgCyDNl65KNpEJq2ay6j2di\nAUOr8n7CeQiZtbrjfVy73oQWelNmIWaOMsD7jvQBNGnj101DPGea8YdQz/OP\nJM8W7yNp8dtzPsnjrwg+0eYMvxBMGYcv4vHE/+IioSW0afRvv2K8M4g3d6pR\nAmpAOTCadpGcYDW32I5NNtovBU7Bq2wipHfUxRn820bJ01Dsj52orjN4ux1N\nDX+Ks00kusYBaTEtIZWn2hPNGD4xCgVHSAz8iYtPkVDL3cit7ZUTo5lhBQWg\n0n7Nx6BK8VnOSfxnNQcge/v9ZVpoUQmcxyVIRdIk2dJtgzCfopSR7LMXTWh8\n70PJsT/CdVqGXRbm0JrQB7aHeIT+SUA2eIAB3Z0eb8Wvc5X5GjTfX74CbHyc\n+VEOFCoUAJvlyLpY6t5Un4DjAq5ioZHw1ntUcuJIrpNAzZv0BmdBcCxIYfmW\nbNJfrUIi6dvwxuCb0B6MrexpdnjN9R31kOtilAaDoYM9L10ZDX4mGUylK5Ht\nBrSd\r\n=KT5G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module.\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude `lib/graph-js-sdk-web.js` in your page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-web.js\"></script>\r\n```\r\n\r\nIncase if your application ships with [es6-promise](https://www.npmjs.com/package/es6-promise) and [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch) just use `lib/graph-js-sdk-core.js`\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-core.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([MSALAuthenticationProvider](src/MSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new Msal.UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, graphScopes);\r\n```\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { MSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/MSALAuthenticationProvider\";\r\n\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MSALAuthenticationProvider(userAgentApplication, scopes);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Angular.js sample using the JavaScript client library](https://github.com/microsoftgraph/angular-connect-sample)\r\n-   [Node.js sample using the JavaScript client library](https://github.com/microsoftgraph/nodejs-connect-sample)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","_shasum":"2c5f8e511f2ebe9c9a77fe8b3179044fd394369a","gitHead":"38fb4ee59e2c75a8a326ec71e162d9fc94e77595","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run build:cjs && npm run build:es && rollup -c && npm run web:js && npm run core:js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","web:js":"node browserify-with-dependencies.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js","core:js":"node browserify.js > lib/graph-js-sdk-core.js && uglifyjs ./lib/graph-js-sdk-core.js --output ./lib/graph-js-sdk-core.js","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","es6-promise":"^4.2.6","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","msal":"^0.2.4","husky":"^1.3.1","mocha":"^6.1.3","rollup":"^1.10.0","tslint":"^5.15.0","prettier":"^1.17.0","uglify-es":"^3.3.9","browserify":"^16.2.3","typescript":"^3.4.3","@types/node":"^11.13.4","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","rollup-plugin-terser":"^4.0.4","tslint-config-prettier":"^1.18.0","@types/isomorphic-fetch":"0.0.35"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.7.0-Preview.2_1557470883400_0.25705669263767894","host":"s3://npm-registry-packages"}},"1.7.0-Preview.3":{"name":"@microsoft/microsoft-graph-client","version":"1.7.0-Preview.3","_id":"@microsoft/microsoft-graph-client@1.7.0-Preview.3","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.","dist":{"shasum":"f6d576345ebfe17620a9550ed79f0bdfd7efae46","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.0-Preview.3.tgz","fileCount":295,"integrity":"sha512-W5QHfDig9rbq643gXflHnlFMz8CwUnwkZFNDUHaVuqdi8YHs0vCQozd8c40HMvRw2E+UsnOzJi4vLcHlKma3vA==","signatures":[{"sig":"MEUCIAT7pYdhtTAD/aPmh0eC2SikhxxqsR6qbSoJ5euAox+QAiEAgvJEi1oHx9sPNM4kSgpoyqOc54oInrWv1cSv/WLKg44=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1029414,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1nDqCRA9TVsSAnZWagAAZowQAIU5mLPEuoMvfS8SGLXq\nHCFZzcG3aVzI9WW1nl66/TOqqQ6sOMXra1ql7LDA+xK9U+DdFy20nh2TM2dn\nUZMRC5KbLTceeLG7zBl/X01pkA36t2kYaZROMWwMcVffA9/bJqAsGPm/VM9y\nGOjJYDEp6JywXRh+l3l5EQP8c/xfFkrS50+Jjvm9cSBzyxaqh7XlwUHpVXrW\n+ulxL6YpQHijHUsBmz0opmIht39Wp4yU6agRBXr5ZMEI8kZ9JsdoY30xQOSR\nyOprojOHaaYAdQbJFenzs10tq2VNA765PoGXxyfGv3sBaX+fcvUQQBDGwjbt\nCp/PTvMAi063tVqAkEpK9ljDQtawY/pa6cgK6yQrYEMAuM6OlodbGkG7siSX\nTvo8FzYPPgXo0bHHq0TJJ9XUxISWWMsgahNIvUMrt6IAyfXawbmcsmYOSZ/r\noSJqXNFqcyHHObvGxHTmESD2YAIpV2kivviFXOJ87j/iwsjtHb+pzETwJgQY\nkhPnaxiLzTmqE4x18uigtd8qZVbC5SOrUEGX7DcNWxF60l8CdH/PcjTiG7km\n8UbbDm3Q1ZFgLBI4nZr7LnPrXMn+cEWNTKcChnSivbDLeifqn05aoNnjSrO9\nlTlaXpGuztfj31xGzUz8uUji1GvV5DwE1KbR6aFCFnd2ugxmRuoQGcu1z+zE\nPE6W\r\n=bglz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module.\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude `lib/graph-js-sdk-web.js` in your page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-web.js\"></script>\r\n```\r\n\r\nIncase if your application ships with [es6-promise](https://www.npmjs.com/package/es6-promise) and [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch) just use `lib/graph-js-sdk-core.js`\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-core.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([MSALAuthenticationProvider](src/MSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new Msal.UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, graphScopes);\r\n```\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { MSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/MSALAuthenticationProvider\";\r\n\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MSALAuthenticationProvider(userAgentApplication, scopes);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Angular.js sample using the JavaScript client library](https://github.com/microsoftgraph/angular-connect-sample)\r\n-   [Node.js sample using the JavaScript client library](https://github.com/microsoftgraph/nodejs-connect-sample)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","_shasum":"f6d576345ebfe17620a9550ed79f0bdfd7efae46","gitHead":"dc4f990d56122e787476693d00a4b7b57767b8a0","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run build:cjs && npm run build:es && rollup -c && npm run web:js && npm run core:js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","web:js":"node browserify-with-dependencies.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js","core:js":"node browserify.js > lib/graph-js-sdk-core.js && uglifyjs ./lib/graph-js-sdk-core.js --output ./lib/graph-js-sdk-core.js","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","es6-promise":"^4.2.6","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","msal":"^0.2.4","husky":"^1.3.1","mocha":"^6.1.3","rollup":"^1.10.0","tslint":"^5.15.0","prettier":"^1.17.0","uglify-es":"^3.3.9","browserify":"^16.2.3","typescript":"^3.4.3","@types/node":"^11.13.4","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","rollup-plugin-terser":"^4.0.4","tslint-config-prettier":"^1.18.0","@types/isomorphic-fetch":"0.0.35"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.7.0-Preview.3_1557557481715_0.2077725147537135","host":"s3://npm-registry-packages"}},"1.7.0":{"name":"@microsoft/microsoft-graph-client","version":"1.7.0","_id":"@microsoft/microsoft-graph-client@1.7.0","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.","dist":{"shasum":"6db6ab95060ca0233784ea0de974951b3742dade","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.0.tgz","fileCount":295,"integrity":"sha512-+XT4t7MogOnsdXRFUe4ekPE5QbpKvW3M/fgacmj6azw4knNJ3MaricngB/BRBmgDnJ9ZOqwGnJUb/tJ3ipqGCA==","signatures":[{"sig":"MEQCIDWGrXoQFNGt8ogNTIrhSLQ7s6wAvFq2D9AnI8D0rgCkAiBzdsxTWcQSiDwpeJo5hzGLYpcv63E3eGqI8e6qbrV31A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1029394,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc241lCRA9TVsSAnZWagAA130QAIptAg0hg0ABhns24cj7\nGxnf0yUtR2j8G1TRKqdOizJXGfUe4GfFygCdE1mYz9iJWR/Xy/7n9upPVmLS\noTBRWSOkkp7R3PkQtMmuZI1WvyHsnlhV0JsovEnzANfVftqRhcjj7SgNSXB+\nhNuGiT/XVDYFvqCHKXYHIz95krztMpZvhhING5ODBINFjQvmhvyxxSJZedSJ\n0qsdjugioNE9ZVDF2AOsGs5BULiOcDz7O8lquXDN1Q3T8NO08CBT1ecbrOJ1\nU2MBZ8z9WiwnLzTTrJsZfZHdPfBI3yNkeSuLkzsvSPkK/+Wkf62OjelI4b6I\nV39Y9iuDQ9l6B/TqBsPKby0gHKeWhQeLHpFrvQhHfSevafGTdqhaZDPuVpy8\nCQM1sdcHx4BUGe0Yg1LmkB6x103r9cxcVlNG0qnGniO3KQ6Oj7b1XjK2yz6z\n8wipFvN1eVD3f5PzImO2PmoFK4OdfHwqp4TXN4U1nSoWswQXoYMxV4ZD6WX1\ntmRpDZX2KKPa5adpu6RRux1KBeN9yy7dIi0Jwlid8LZpdgqQ+7G6ctPnccsZ\nTwqwYxVFwlO88/t2dwOVXMGJEpfLNgS84yJSrIoeQ7QPrlv2FeTDl8VN/wMt\nn+4Hy7RFPh3yiyNJK9JLepVTqsZuXZw2MJ/PZYmhzqxenwbWaNlNr02aVUNo\nZlNq\r\n=4PLl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","_shasum":"6db6ab95060ca0233784ea0de974951b3742dade","gitHead":"064fb0357dd31cd67755a6ed8ebb88d0a66561a0","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run build:cjs && npm run build:es && rollup -c && npm run web:js && npm run core:js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","web:js":"node browserify-with-dependencies.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js","core:js":"node browserify.js > lib/graph-js-sdk-core.js && uglifyjs ./lib/graph-js-sdk-core.js --output ./lib/graph-js-sdk-core.js","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","es6-promise":"^4.2.6","isomorphic-fetch":"^2.2.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","msal":"^0.2.4","husky":"^1.3.1","mocha":"^6.1.3","rollup":"^1.10.0","tslint":"^5.15.0","prettier":"^1.17.0","uglify-es":"^3.3.9","browserify":"^16.2.3","typescript":"^3.4.3","@types/node":"^11.13.4","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","rollup-plugin-terser":"^4.0.4","tslint-config-prettier":"^1.18.0","@types/isomorphic-fetch":"0.0.35"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.7.0_1557892452273_0.17142332915206926","host":"s3://npm-registry-packages"}},"2.0.0-Preview.1":{"name":"@microsoft/microsoft-graph-client","version":"2.0.0-Preview.1","_id":"@microsoft/microsoft-graph-client@2.0.0-Preview.1","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"d80ae0de6d093b6d94ec107176c556c577b40f5e","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.0.0-Preview.1.tgz","fileCount":294,"integrity":"sha512-MyDWhOLHSP5L6zJD4IY3sJD1IAuFjzyxAXxur94CZfRkTjJX29AG9lHDhNdMUwgR2m491duHQ9p9Zv6NBtrX0w==","signatures":[{"sig":"MEQCIFVqY1Om+o8lm3Q4F9c3QLWQIx88Pz2URQl27XZDyoGlAiA8dvqAo79JjX270DyqJGTOsCLob6Ia3ekYoAyzaAQjZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":809520,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCgHsCRA9TVsSAnZWagAAjDoQAJYZA3T0aPfefo4vhHqH\nY2LUAoXw2nP0T791eoOmliaJWowo6IWqa0Ee561m+dZfoYW5MrGitD8E4+/h\n3y722+zUCOtzpqTDkUsuaV9dGku1GeN19n3pq2clZZYPtFFyBDPHwCtRZO7l\nwxBS2L1NgHp9dnfqIhnx9DNggvQAp7OrYlz90ORuORcNPsi998+jvkA4pnJK\nDq2oj1WQJxLXR5TZNylz4cOrekdo2Gxaovr8a5SMMQdhBbYi5/skvOAllXQx\nBN9UXnWmY1zncfuCah/zKQo+z3/3H5kfbSW1rm776/8ODibQlk18mcVWgYho\nq1QETAu5EG/DgneAv0XDFq1gk2uJe2CYE3chi43pqTPB6ezeIwC9ch2EeUlt\nDhf0+c9j8smKuNQ7HWchpZS7TIL7j0Z0qDAmt0w0DAroaTj2919FDDRoMFAL\n7y7D+h8WYHmQa5BQC2pcvZvJuykQ6zbPta2AmDMfcU/Xj9fFc1QI2ZaBO+xb\nO0313mRxlgQC0RBuHK+5Ycgb9w4qwXN59K4ilkYsJrsw6RWlzAXv3KE5LK9A\nD8gAPJjSNSZeXhFKZOmAUlmvlEtNaBWbhIo5msYFh44att2U5Xhwfk9biRQh\nf4v9nKtZa9tmiah93NLvHYRsnCCRwyjxSv5k2YPrxNQafzYiOiIk8HEW8gqr\nH6YK\r\n=9/me\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module and also you will need polyfills for fetch like [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\r\n\r\n```typescript\r\nimport \"isomorphic-fetch\";\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\r\n```\r\n\r\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\r\n\r\n```HTML\r\n<!-- polyfilling promise -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\r\n\r\n<!-- polyfilling fetch -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\r\n\r\n<!-- depending on your browser you might wanna include babel polyfill -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([ImplicitMSALAuthenticationProvider](src/ImplicitMSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Learn how you can create a [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\n\r\n// Configuration options for MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL.js-1.0.0-api-release#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\"; // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new Msal.UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { ImplicitMSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/ImplicitMSALAuthenticationProvider\";\r\n\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Build Angular single-page apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-angularspa)\r\n-   [Build Node.js Express apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-nodeexpressapp)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","_shasum":"d80ae0de6d093b6d94ec107176c556c577b40f5e","gitHead":"f813590e440ddf12c7fdc62fa437435dea21780d","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^11.13.9","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^4.0.4","rollup-plugin-commonjs":"^9.3.4","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^4.2.3","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.0.0-Preview.1_1560936939156_0.01880386970364034","host":"s3://npm-registry-packages"}},"2.0.0-Preview.2":{"name":"@microsoft/microsoft-graph-client","version":"2.0.0-Preview.2","_id":"@microsoft/microsoft-graph-client@2.0.0-Preview.2","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"127d6266328f4437a8c2f7c42a28fe07ec6cdb75","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.0.0-Preview.2.tgz","fileCount":294,"integrity":"sha512-F3mcfYjjaSeJ6PM4E/+2fokCth0ac2aK4nfHJ+6f1CH5Ooybxp9/9x8I3qX4VKej2AzIGdEsO2ntsAZNg3pYqQ==","signatures":[{"sig":"MEUCIDVZv6eo4Hn2xraqc6RpYTXup/OSsdlk++wQ2koCPEhqAiEAwEX2bSTK5X0DMuiZM3Fuo0fzVdrXzi7rqO+42fQ0z4g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":809428,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEa4YCRA9TVsSAnZWagAAXSIP/1seYtqP/VONKzuqJ/1S\nbxoDdSWv3ssBzJh1WXD1BiofNNaA2YqTcY09Ac5efCJJhphZWRNH64UX0Jat\njontdHYJ/rDryABv8A3qvTR2V1zYUpzEqIrurllHkCIKFrTZ7fgBQPBoa97Y\nkUWF2IXqnO8HjnXEpCNEuCI2jgc00N33fIaneOZLWpTmBFB/so7AdDRHKeFm\npfPqmR95uR2bfm7aFZDMByW/4pCTsbkxftozXJSifIdb59GNVHi0ylrYAgDU\nnb9NMqnG4MCltvrpnYhJOrtxto/u2TBL9ifo9FUe0UpFeBOVJMduZ+p+yvSo\n//w90F/6X/kEO/TjaOG91ugAHX50LTJf1Vci6Ifl4Adu+xFbskPB6KSU6c8L\neCpb5EWfUGKhmQY5oGOWklJyyLFddwiTjDOUpTmENuJCVhCzvXiBy10pps2G\nKKfx/0x6zvHE4wWqB1cqhsc0dByFibJPJUiMpXguiKeyRA2s9UUDPaEL/Avk\nz8LuBMCRMBqrnOCiBRalCoJkF5WQDDKjtQDWmToJcyvtW6942GfJSRD95gtq\nGcdTl8u8YIferHnkz5cbfDnU8rYSS4GYNBMJyWxlL/LVgASku9ISFEjm9b7H\nXPbFGxvR3gRfhJKiXFES+i3RfKwSlSmZ+v8SgdedbAduv35mCB2/bpdlk+gq\nVisH\r\n=G/gh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module and also you will need polyfills for fetch like [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\r\n\r\n```typescript\r\nimport \"isomorphic-fetch\";\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\r\n```\r\n\r\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\r\n\r\n```HTML\r\n<!-- polyfilling promise -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\r\n\r\n<!-- polyfilling fetch -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\r\n\r\n<!-- depending on your browser you might wanna include babel polyfill -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([ImplicitMSALAuthenticationProvider](src/ImplicitMSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Learn how you can create a [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\n\r\n// Configuration options for MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL.js-1.0.0-api-release#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\"; // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new Msal.UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { ImplicitMSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/ImplicitMSALAuthenticationProvider\";\r\n\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Build Angular single-page apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-angularspa)\r\n-   [Build Node.js Express apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-nodeexpressapp)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","_shasum":"127d6266328f4437a8c2f7c42a28fe07ec6cdb75","gitHead":"d83b993271d7e302a40ddfceec63d4d549125eb4","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^11.13.9","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^4.0.4","rollup-plugin-commonjs":"^9.3.4","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^4.2.3","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.0.0-Preview.2_1561439767876_0.8786111976928277","host":"s3://npm-registry-packages"}},"2.0.0-Preview.3":{"name":"@microsoft/microsoft-graph-client","version":"2.0.0-Preview.3","_id":"@microsoft/microsoft-graph-client@2.0.0-Preview.3","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"b66fe4442dffe6322a69daf9325278e82a166c1a","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.0.0-Preview.3.tgz","fileCount":294,"integrity":"sha512-GOndF4OQjAKSWBDHDv0+M0SFhm+7zXKUdLWX3rqcoC7cMuHVLMGprGT7xBemC0HQPOiowWD63vVDajX7cWdiNg==","signatures":[{"sig":"MEUCIF1l60Fg2NQ7mFsPHyi/m3xWh+TwOVIhbifoU1reRtRkAiEAgCTdFnLIizZWAbzEW3ihHC4+FbC1Ndtgpm5jFdjhijU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":811308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdGdgcCRA9TVsSAnZWagAAfjEP/jX/wGkHxZp5RFi1ILPI\n0KwzxOCTUGOQ4Ve8vRiSbL2YtSLiuXzmaiBX5zaeWOX/dTM5SWfcuqSJOHSg\nyPqj6Pp1v5PaTG4NcYYMsjrKfPfK3fKBBSOhwiopI8rnXw0t3zg1zxgZoytk\nRcqEuexEzwnl2xSrDLRHYk7x/btjhDX6NloP9r4swldW89PAN8SvKd2VijXb\nnEggkYnrThEZ6aFtEArrHac7oL4rR+6QCGS4OwQvF/iuc+GqamDC0RmIUag+\nl+QogoBKXqi8/xSbE8gzjoGwYrm/Ob/MUWxcwwcrr04fy2XtcSgQElUUmgdc\noGemMt/U07CC1gHv6o6eqFQl8BlK9bkjG5sSwRimplqe3hJ3UNbvHE5wEZki\noqW5j5BdrmWceRSWZchl3G2h0cSBf+nhZ69stM9GuuLbk2vy/zMXMDPWKRx6\n3Qj97sjnr+nlj3rIn3Ox71MGwcvt+/GI9L/pCzqvmnD1bVRNVidZXJHMBIls\nAx9hq1sulKPt01NOP3ndty/cfwmtvBZzg+aCh7S/McBjIhSbjMWf9gKi7uCr\nLETahMNpVa3Bb9WObEtChaoUw6mFClsfZouwzBwxsE9dZMOrBJf7krUFQgKb\nFNxZWUnGfM5BQYYNq+RXa4UkcZb36NNIFeyNkU0DdOwqgk0LozSQ46x12YVZ\ncMfh\r\n=rqJF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module and also you will need polyfills for fetch like [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\r\n\r\n```typescript\r\nimport \"isomorphic-fetch\";\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\r\n```\r\n\r\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\r\n\r\n```HTML\r\n<!-- polyfilling promise -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\r\n\r\n<!-- polyfilling fetch -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\r\n\r\n<!-- depending on your browser you might wanna include babel polyfill -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([ImplicitMSALAuthenticationProvider](src/ImplicitMSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Learn how you can create a [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\n\r\n// Configuration options for MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL.js-1.0.0-api-release#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\"; // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new Msal.UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { ImplicitMSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/ImplicitMSALAuthenticationProvider\";\r\n\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Build Angular single-page apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-angularspa)\r\n-   [Build Node.js Express apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-nodeexpressapp)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","_shasum":"b66fe4442dffe6322a69daf9325278e82a166c1a","gitHead":"21b8edbe449f28c4eac40d52b9eff20755cc7e42","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^12.0.10","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^5.0.0","rollup-plugin-commonjs":"^10.0.1","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^5.2.0","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.0.0-Preview.3_1561974811271_0.07824141642581761","host":"s3://npm-registry-packages"}},"2.0.0-Preview.4":{"name":"@microsoft/microsoft-graph-client","version":"2.0.0-Preview.4","_id":"@microsoft/microsoft-graph-client@2.0.0-Preview.4","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"0f99e39e1f8f2d694cc7416116611fa7a3b485d2","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.0.0-Preview.4.tgz","fileCount":294,"integrity":"sha512-X3SlFJxIMA0hU0S5C21NA2jQgxwvyGRScxai5Jli4netUdnGLFLopVyheB4aSNj/pcXM9guXh401LCfd1jQPow==","signatures":[{"sig":"MEQCIEObLb/uf+x+eps4rqgBtkW+QbtD1mnBz9gVBe6i51lhAiArZWnomPG7OPP5/LNNdCCDCuc7TsHO2gZuddrafl/i5Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":811855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJwOrCRA9TVsSAnZWagAACEsP/RP9lyFLg/NtabO3xlFP\nq3h3h6+3Mrut2xO9Oj517yOWEj2rxl48HqEEop+pnNX0PrGrnS9X1FJ+LzKS\n2OscUW3JRfia3x4hKb9kRlxe4Rj/foVHgI0l8DPGIyh2kbI1isvOfPrjLCs5\ndwnNNQK3OF0wXGzpmH4XtS5paR/VV9UFpi4++NLREGg67vTkx7I+cZHSgHi0\nKLDfq8vzJWoVGUTnphp3kcho+3WFrr1+4dctYdQXleA/WKtL2Ghd+IFMoH4r\n28AT+6ho3r//ADPWE1z9SwdgjFtDq37uWWSOIQqizrWvlE9p2E8EWhBkMyNO\nhwxrgQjmp0xtm7pTYmdnGUCJ5BxYe6pc6I253HhCeR/ddXhf86BmD0P11rYF\npjcCi/0avfa304kY0CiByViYQHa2FYZR744Ef+tukndaI8f4bZih0dkWzvbX\nLjzJ9F/BrW+QdLAekP5Dob1w7kL99IezTnOUolbzEZoWCKabqYlgDVoSb3+F\nwYEONMgM6heuPwZzDPmkBu5e9eKWDnVFM6pJ6N+/iO8nzmL145dNDM1X5PrL\nXO2Yc5TwE0SPiEGloIDyTHsBKiMtOm/XsgbQWk+EoS3zvQ2Kv9i80LT2qDD5\nsylXQhsKpLL377lLeLoFWvf4TKUztVF8+RjKuX32eU3BNJfzP3rZVXEDBlc6\noCQt\r\n=XUK3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module and also you will need polyfills for fetch like [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\r\n\r\n```typescript\r\nimport \"isomorphic-fetch\";\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\r\n```\r\n\r\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\r\n\r\n```HTML\r\n<!-- polyfilling promise -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\r\n\r\n<!-- polyfilling fetch -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\r\n\r\n<!-- depending on your browser you might wanna include babel polyfill -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([ImplicitMSALAuthenticationProvider](src/ImplicitMSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Learn how you can create a [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\n\r\n// Configuration options for MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL.js-1.0.0-api-release#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new Msal.UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { ImplicitMSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/ImplicitMSALAuthenticationProvider\";\r\n\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Build Angular single-page apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-angularspa)\r\n-   [Build Node.js Express apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-nodeexpressapp)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","_shasum":"0f99e39e1f8f2d694cc7416116611fa7a3b485d2","gitHead":"edbec9454111c417f39ec381a9f780e83cd14d25","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^12.0.10","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^5.0.0","rollup-plugin-commonjs":"^10.0.1","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^5.2.0","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.0.0-Preview.4_1562837930651_0.8806271639151069","host":"s3://npm-registry-packages"}},"2.0.0-Preview.5":{"name":"@microsoft/microsoft-graph-client","version":"2.0.0-Preview.5","_id":"@microsoft/microsoft-graph-client@2.0.0-Preview.5","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"d4e2d80bb27012b32808bff2214503b696026fce","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.0.0-Preview.5.tgz","fileCount":342,"integrity":"sha512-K+Z5X+lKk8Irx0lCDAjgOK5aQD8Pv7ouYUfjD2MnPuCk11F01rcMypAnBUgfxFQbxA+Pm42a3vdN9DS7zFt5Eg==","signatures":[{"sig":"MEQCIEAVyn3cPfakv3aOE8upqzGxtd9BtjrcfGPJSkxqLtByAiA7dJNKNIYN5ORMy9n3P+FglAJcWygOwV4oWPbyA86Q1Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":973556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdU9nfCRA9TVsSAnZWagAA8ywP/RN2+MYFfjV9S1xFFwZ4\nG9HTUUY1lWY8D0nRx2zCsGjQHlTalPxpO/6cSG7QY9YcRVtzqfaOQXvcdzQr\nk+AxTL+YxLuVmKL5VsOoLCApDi98lraljIwiD6W6vXlIDwfLM9jUg2TLX8zG\ntRy3MA/uuOc0368wwWdeAkgfOOybrVV8EGjivUd89A6RKPVt5Z4DGuHnk40u\nYvC23tD/ADTb2+IJfmjYFN267SLXj2qU7cgdUZy2KgO6Wy+0YkCLvNgFFJw1\n1PBSpL/2rpkGDMW0qPTIC43ckcQl7vs4p3Yn1zWStBb1o6bsgdt7ZnCIB4Qm\nVmjgaIUooYFCGt0Fwt/5s6cv/lUACsl8Fhiln3VmU+LfFRqjtyS2LbjL451e\nfvGgpq1Emgf+XG/k3xrq/PVF5XP9Zkl0dVcFTZ0NgGDQgTB73bCXbf8TwVCe\nEBPrpCKS7lp3Cm+WWRuVLVpZZW8WNSVOMhyckgEXOOHMyD6qYNkwuTKeJ4Fz\nQHUQMLzapKB/sVAAKYDe4EAbzC/v8fC9dHjM3DxS7MOH3moNOClTjC/o+YE4\nZlL2qYR9oKR+w/8R4QntfcvVhRWA3U3JuOmr1qh+v/oGj5jDQRJ7W4+LSmAL\n4N0pDcAv7BHopeJoyhrsJAOM2r0fijT1084/sCA/dS6Dpl1L3CzAGTXX7/X4\n5qZF\r\n=hY98\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module and also you will need polyfills for fetch like [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\r\n\r\n```typescript\r\nimport \"isomorphic-fetch\";\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\r\n```\r\n\r\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\r\n\r\n```HTML\r\n<!-- polyfilling promise -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\r\n\r\n<!-- polyfilling fetch -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\r\n\r\n<!-- depending on your browser you might wanna include babel polyfill -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([ImplicitMSALAuthenticationProvider](src/ImplicitMSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Learn how you can create a [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\n\r\n// Configuration options for MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL.js-1.0.0-api-release#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new Msal.UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { ImplicitMSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/ImplicitMSALAuthenticationProvider\";\r\n\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Build Angular single-page apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-angularspa)\r\n-   [Build Node.js Express apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-nodeexpressapp)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","_shasum":"d4e2d80bb27012b32808bff2214503b696026fce","gitHead":"09f3dbd08090a4e9aae60aeaba1b2b62d0fe7fcc","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^12.0.10","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^5.0.0","rollup-plugin-commonjs":"^10.0.1","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^5.2.0","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.0.0-Preview.5_1565776350421_0.02006219626931971","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@microsoft/microsoft-graph-client","version":"2.0.0","_id":"@microsoft/microsoft-graph-client@2.0.0","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"07ae4d35a97c5758f5ceace28150d2e21e93960c","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.0.0.tgz","fileCount":342,"integrity":"sha512-njofq1RCCN41ZccJH6/akJWk64fl0k3Csvi1+WS4nKsuev0NqsnmmTYfSBC12GPLOHvZz6ygoGmvE6X8scKkdQ==","signatures":[{"sig":"MEQCIC0mpEgiEWDH1EmqXbtClZaZWiDlwirJDAxFwgEUbkI+AiAFbBHezLD9M1d2D4VMzz3/gwK0XCT2lCszFdjMV4fJpg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":973541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdZMQOCRA9TVsSAnZWagAA3DQP/36QzWvC9YRwSk6SYBtD\nlXH15P+lhYm6q75+HnVTJoVwXHqR1142eBAHAhy/mJhUfbxT/GJhFr9KklzM\npFuldG+7B1BKZOD82fvy954WQ186zXLurG1L3ZfVuis7Q9OY49hfoeVs5l9Y\n32s+lRkI8aDqSNk3LdJPrezpWP7tficRRlb+6Qtqv1F55zlt8y1WSsKHbe6a\nKRSyn+d26YhbIfaRnbgZxxWi7YzNCIrMy7Y/YrzepUeuIgYHC5xlk3qLx0ey\nx7BGnWZehoiBApjETrNyTmgElgYg2khC7K1GtSGfT8hgZFVuASNSsnrz+ipw\n9/LjWq8yStpy9VxmLsGWVk1rXdJkHT4hRv8o8kzWwDP8Cu+gzL5DHjgoA3wT\nJV+iS/zJh28Al3PNt3F7mzbWJXjdlFTlm4XE/qSFLdGBduz7Uk+y7CX2ja5Z\nw0rl3srQliqzbFseKadwP3uuUMIohunkTzXWfvlUtmSB5gIAJfRTxNREMCXj\nutTr4TDbV4veGoxswbcogpi5unPUtnnjqnWoWnjuBZtYix9vVTHrI+/DfotN\naOqYrj9lWUVTXTypn4rFsBTzKCu7hf48Z+4uj4a+WlJmxTZ8ier14dBW9kuD\ngEc+/JAlduiFLyWc3+H22OCnlDcfnKSJ52OA4O0VgPaeDhh9LSRbh4D3GQ3E\nvs2u\r\n=TOzt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","_shasum":"07ae4d35a97c5758f5ceace28150d2e21e93960c","gitHead":"d38a32f633ed45f6f2d8515e422e28f4c06ad065","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^12.0.10","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^5.0.0","rollup-plugin-commonjs":"^10.0.1","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^5.2.0","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.0.0_1566884878083_0.6170298756788264","host":"s3://npm-registry-packages"}},"2.1.0-Preview.1":{"name":"@microsoft/microsoft-graph-client","version":"2.1.0-Preview.1","_id":"@microsoft/microsoft-graph-client@2.1.0-Preview.1","maintainers":[{"name":"dan-silver","email":"dansil@microsoft.com"},{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"631d74ccdaff980782d588bbe31c51b745424cc6","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.1.0-Preview.1.tgz","fileCount":342,"integrity":"sha512-2nyr6ggXjAUU69ONCN/MgjHXHBk/eqkEyGJq60YQlu9GWx7oSO7hRdSFj/dYZJIpCEC0O/vssSgezACCiZp9uQ==","signatures":[{"sig":"MEUCIQDm4eQpi5FwYx4LYKeWf1pPSUjAmk2S0NQ95OsG6I7IBQIgfozYVkPk1G6MfsbHiw+ULW8S/XGb+vfRHo9SB5RDXPM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":989003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJds+qQCRA9TVsSAnZWagAAZxkQAI6bBQo35JNZALQ4WlUP\n5bt2DWrRRhfixvgFyclcKNrvkfeSYAwJNNbEJ5UOQn+bPNWpf/FX10MlxtcZ\nYomGgUuEFujNpf/rJiFgKSa5ouVRZHLix7QmFgUP/kfVA8VgmdMgpB6cXVPB\n1DkH7u27QeLwPEcOTkxK7QljKkiNAhK82d/udAnmncywPzarsnLwwHhOtaqF\nRf3OrVFGkqFJJzWVw+tbzHX/bKW5XHQ6FunY7w5pCMRyd3vqqF6A3y0du9+p\n8z9puvNHWNWKpH3208tii9rbgp5BqYZJNOs5NNHruJgIlKLsrsNZURN6w3Xj\nrEEqBbDOdOCrpBVtQwR4NCNHMUgUmx0cpNcsKPespxslzjjx1NUpJv460sJq\n39QPSyfWXWlwC01kDuSgf/47d8PKYnm8F37loZnubmaNMcsQa9THkIHTuP+J\nLiowqyT32cTas/bVePVxUhSM9yn7kAGstbh3GPEykFWJMgMqWsefzHTc89Fh\nneVkPHR9xtcIJUbKaTcGoubhbWd9i0LAm0eFWUCt/VPO3w/UbJsFjXiWKmOj\nJOAR1W2Q/lvlqscFHeb6mCk2BYgEbqf2g0guuOtmuK7o+lquOg02vocy0RNu\nSpRhS/DWWkDAR1Z5xkSNjieKsjoI0ia1vENmrqHAPGT6xOkTSQkA1ki/8X/f\n/IFj\r\n=ID5+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","_from":".","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module and also you will need polyfills for fetch like [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\r\n\r\n```typescript\r\nimport \"isomorphic-fetch\";\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\r\n```\r\n\r\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\r\n\r\n```HTML\r\n<!-- polyfilling promise -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\r\n\r\n<!-- polyfilling fetch -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\r\n\r\n<!-- depending on your browser you might wanna include babel polyfill -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([ImplicitMSALAuthenticationProvider](src/ImplicitMSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Learn how you can create a [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\n\r\n// Configuration options for MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL.js-1.0.0-api-release#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new Msal.UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { ImplicitMSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/ImplicitMSALAuthenticationProvider\";\r\n\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Build Angular single-page apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-angularspa)\r\n-   [Build Node.js Express apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-nodeexpressapp)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","_shasum":"631d74ccdaff980782d588bbe31c51b745424cc6","gitHead":"c3e0ef343c04f9ab19949f68a6a3569f43a65bbc","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"3.10.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"6.9.1","dependencies":{"tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^12.0.10","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^5.0.0","rollup-plugin-commonjs":"^10.0.1","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^5.2.0","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.1.0-Preview.1_1572072080195_0.7909081528364541","host":"s3://npm-registry-packages"}},"2.1.0-Preview.2":{"name":"@microsoft/microsoft-graph-client","version":"2.1.0-Preview.2","license":"MIT","_id":"@microsoft/microsoft-graph-client@2.1.0-Preview.2","maintainers":[{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"856ea0a463f470dd0b4b1f6750bfd48cd34c9d33","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.1.0-Preview.2.tgz","fileCount":377,"integrity":"sha512-4aOwuYhPSnhDLxF+M15q81A9tY544m8dM60f8tChfgs+Dp2rE4XeO9SmUABEOWw0lA2ZusYnLr9tm6KYpjQZiQ==","signatures":[{"sig":"MEYCIQD1VmhgPeOvN6zVcn9Mp+VhCKuKC5QZ/R1eWRrcZGIhfgIhAOvHa6BkgIKIfPF/y4x9rxSdRvgWCQVLkudgcId/ETHv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1129397,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffMMyCRA9TVsSAnZWagAAPo8QAJcF7gyK5B+RH+xW4ZBg\nz97YvMxYLnltpfLEVuRvgoFSAXTsa1+HrZ3dL9An/Yr1Gs0RXqRq6su55k1/\nSW2e2wcfyJ1eKF+B1PaFiQOAw6gOyh5axX2gx/7WaCF50MpV24zLiBA5VC9J\naYZF0p1TxwHV/yKDBl6AaKsknN+8u/K0FHImPflkImeo0BHePEJD5zotQlZR\nwQWkXYz/D2Xx+4k+7XHEImohL+YVYh1dQWc1CJUVdeO09jJRRw/BBbliRIUP\nMWzlgBPNNuORiBRsY4EH1DOyz6VIjVQv1T5DrX8ub7qeDYXXG/pzPynvtxwt\n3DnwY4sLHk50o3xN4gLjgAm/qYGW7ggdEAm6cP9Xpxfv8HEObFQ2zx8L8iUd\n77nNxMAPbF04GOZuhTvWlbBc7nQ9yu6S4W1LcwJyaKVH6FVpJS39bjVgLQ2K\nA2aQHxD96vxiivgVY9SmJGs+t5Hr+p+axAdxY9+tdNriEPWAXQxQmFiewSpu\nZps3HNWQ0/JGTYOwTASlhvX62VNAzHUqvhQKz7rNu0cAokb7JWGH0BS73VfW\nxmNnjtUSYosMParlBNGMSYI0w0DVMggdkIiLWopVpm9N3uLj2FriAckqkjE8\nZnn9Dp52lyV1ykSTn0EAW5ZhSUSlIODlDjI/ptbfVGCWdNJ0GW6wQejUAFfg\nFtaC\r\n=pnG1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module and also you will need polyfills for fetch like [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\r\n\r\n```typescript\r\nimport \"isomorphic-fetch\";\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\r\n```\r\n\r\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\r\n\r\n```HTML\r\n<!-- polyfilling promise -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\r\n\r\n<!-- polyfilling fetch -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\r\n\r\n<!-- depending on your browser you might wanna include babel polyfill -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([ImplicitMSALAuthenticationProvider](src/ImplicitMSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Learn how you can create a [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\n\r\n// Configuration options for MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL.js-1.0.0-api-release#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new Msal.UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { ImplicitMSALAuthenticationProvider } from \"@microsoft/microsoft-graph-client/lib/src/ImplicitMSALAuthenticationProvider\";\r\nimport { MSALAuthenticationProviderOptions } from '@microsoft/microsoft-graph-client/lib/src/MSALAuthenticationProviderOptions';\r\n\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new UserAgentApplication(msalConfig);\r\nconst options = new MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Build Angular single-page apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-angularspa)\r\n-   [Build Node.js Express apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-nodeexpressapp)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","gitHead":"a95a762b9b7f66fb843aa1e134014f4214bc093a","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.14.6","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"12.18.4","dependencies":{"tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^12.0.10","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^5.0.0","rollup-plugin-commonjs":"^10.0.1","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^5.2.0","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.1.0-Preview.2_1602011953840_0.7418905506964479","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@microsoft/microsoft-graph-client","version":"2.1.0","license":"MIT","_id":"@microsoft/microsoft-graph-client@2.1.0","maintainers":[{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"e470b729e1b7357cb2c495b39e31d043a3b69cf9","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.1.0.tgz","fileCount":377,"integrity":"sha512-2OjZjz9ink5cXdY3107ZaLe9E32muYhQJy7e0II9cPyBeOXnuJwySzXC4Fv3UhPO2CjVvysiHIQo5gfszIOJHw==","signatures":[{"sig":"MEUCIDHS8YfeMMk01kdgy9lZQXDET98yUGUme+PXUYidetGBAiEA8kiGKEhxxDVE35dIBd6Wm9vg9SVKyJzRzIR5nttqqpo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1129162,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgJ/yCRA9TVsSAnZWagAAKQIQAIgobisYxmhIiYwxWrVb\n+Z7o6syOf6un4Km1mAvx7UNxaOe13iVDDr8ERgAxFqu0FlRaAJxrAHDdWZIg\nBnZ+kkoaM7oNjpHk/a5q9fGiK2ee3Xg0bP5SMQtKIrDukovz2BDa/zFhzPpM\n2OJWpTYSRf6pqzFnHQFZ1RHFEwr13zOWv9zkAecsBuOLPNOk6d6498M2akQT\nOOA8j67yrFZlFYyTHhhTm3x1NGVSLURNgmnNoAWKUP89zcCuyw+msHlQVacr\n2480X3tKKw8kAoerPbTpamuuV8X3xeY3s1JjlWCIrDG8YFIu0KKUFvIYgpu7\n5uPKeqtd+DGbGQ8BZFnPkWKDYet2yI7yr5cPQa9VIWZ4nq1xi47xbCgSMXUj\nkJ9Ocjf7hhYLnvuAT3ueWborUROJffI8BA/2mqaoFpl2f8XZNEtXPG8/opq/\nq3tvqMzxRT3fVg4ZcaCY5302f43huoc69BU8v7vHo+QKeKiVdmYyMwmup1uk\najxaK5mADcb/LmlvPd+rZfMZw1qHKy8le3qCWuEB60i/n+1ZCKFciKyBmOgZ\n0GTtnPvxDgAxEz/ES+9ihwXy0gkE9mPqDC4sbZxHVWlV553Hrq55cR80ydC2\nh7OktRbBqKcXgIgShJ4QcJCO9nOimFPhsXff8UDx/ujzF4r31K4UJbE4pAVF\nNybw\r\n=p6Sq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/index.js","gitHead":"b05fc9c15e05baeacc14df308070512ff8f0d19d","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.14.6","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"12.18.4","dependencies":{"tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^12.0.10","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^5.0.0","rollup-plugin-commonjs":"^10.0.1","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^5.2.0","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.1.0_1602265073564_0.30641309239856906","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"@microsoft/microsoft-graph-client","version":"2.1.1","license":"MIT","_id":"@microsoft/microsoft-graph-client@2.1.1","maintainers":[{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"c226b9f68be8ab7d3541ffa6eaeb95780f03f479","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.1.1.tgz","fileCount":377,"integrity":"sha512-ftMwWPn5QTMxWK/6ZHga5kmCMwE/XF2FNFf6Wo4smYSrqhWUQso9taJGGthqxaMB8L8ISq1HX6knxSr4zGHhFQ==","signatures":[{"sig":"MEUCIBRKuG341nk8193AlKnGrDfKdxeuAk9ZpY46OX2bUuwdAiEA5wXHxLjExG1m4oBxESh5YNDvbw9EQCXv767BFK74n48=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1129973,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfnHMnCRA9TVsSAnZWagAApAsQAKHNF0dM5RxsoHZ47dSp\nf+VtJe1aTI8U3VECqJeJE3Vyu00n5qPTXi+cz9OE7r99nAyZvKi2CNY67MLz\nWfHODD1YkhkWUR2PSCSDjWE4VXAfSgNm9bdlTUOwj+9YZsgdSuFX5EAkOSpP\nCaFtFgcEpO+F/tqer23HF1xuIr2SijJfhVHWTahResac5SO5aEth44aJ4N8r\n0c+huX7CjSL09DiNr47PemoRo8XTcwDMSP0EI2axUJToID2AmbSWGMPCTgQF\ngNCFVt7oXMfwi1MqiAbRI3M+HCrj11aknnALXpCly0mLWZSuFkjyQwwb3EWu\nfuuif3h/cra/hksTAhFFrggxeBo76bCcNbxYlfCasrsKY9NU9p89blcXzL8r\nXhkmFKD3NFJpI7Uoiju8ReegD/D5zCYDBO7rFY6jnHRY+p5a5tRDs2X3Rr9u\nElD5d8L3eNwxnWGF23sa6QzeH+tcmNzgponaS5e3pZFdD1w/9w9KR0vIB+Lw\njnckJero0uab7xrZC0KoMzMvQ6C96f9ZZR+Trmq2q2cIhE18t/qVCD/AD3OD\ncCnYHDMh7kHwKzN8efXaGv74w6pCO60LauMReYNGjbD20Ab61TSh3Xc95Uvh\n4gTu5omuZZ+5UeMh0c9Kz4y4RqZzzKAP6oLfqjfFAjBVjK3nN7qImQussned\nkvrS\r\n=vHF9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/index.js","gitHead":"c7deec22e0d25ee4b3cab5dea951b217c2a7b677","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.14.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"12.19.0","dependencies":{"tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^12.0.10","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^5.0.0","rollup-plugin-commonjs":"^10.0.1","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^5.2.0","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.1.1_1604088614931_0.3650051289968279","host":"s3://npm-registry-packages"}},"2.2.0-Preview.1":{"name":"@microsoft/microsoft-graph-client","version":"2.2.0-Preview.1","license":"MIT","_id":"@microsoft/microsoft-graph-client@2.2.0-Preview.1","maintainers":[{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"69af93a1ece9f706dd629455ae9c53734b48cf09","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.2.0-Preview.1.tgz","fileCount":377,"integrity":"sha512-6NSxddCQYYMwM/w9ft4egjf6QKc/vtT6wptNSsxt0TzM1Ny/sLQb+Hsuarjtq+JQUHBYqRyC5VgkzqpRuGOHiQ==","signatures":[{"sig":"MEUCIAgfuaBwMxsiVo0z3DhtGDdAxWrQ92LF3oIhsWksr+4dAiEAvohbed0ClnChxvwp0dJvXwWCXb1h6MN6znHn+BXy1H0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1141878,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJftb+4CRA9TVsSAnZWagAAmO0P/0G+YeWCc+Crovm3oaep\n1aY6Z3dLQznKcC3aavFtYXqOnXyAg/JuYZSQ+vzDxvkH2nNfZGRZOf6kccNm\nd/xmlt+5pk63mRlET8m43Oj0WL6D0ZG8MDxwIObIemZv/xS01NLmqxwQ8fcq\nIS3Pmktn+aqog4CUrdUCRs4tqxg0rQW2edZBdJ5+NuwVokFacQEOINwmFfg8\npBEzY2iVInj/nPI65rdkJMic2y31HW/Vc/QqXQKVwGU0A/p1ntw1wznd44Gp\nL3i1tic57cWueM/dsi5m4v0foZETWy4ey7y6fo+6qudn5EqIm9R+hRdcC1SJ\ntE5SVaFFJ/D6SrOo0VdiwXZ8YQROWSsEEj5bzhyF5k1cC6X3mYfJsGyVUxqa\n2ueQhjm07GazXa7PNK4CH/inCt3Z4RZuisnaO9qrTRF2OGAFyod4Z3uJWFls\nscSeR1H6WLg553gU+A+G3JWb+yXQv5oy/krYoe1mS3seMti9NF7oJB8xk2Hp\nVPfoI6r9m6v17ZJ+bWWyInRdJJjYyK9xuPg7TylS0MO5JeWtOt/xnGrsKt6I\ns4hVkdjobLsCT/Nez8tXEyvXVpbH+6HD+sTk/gny88gY8IlPE+gK7hXyY1bh\ng/zYrrZA2q5aK8n1s2fmAJ7q0T5Yin6MiYLYXdp22n98MqCyfyFMkX2OZJLZ\nWYN1\r\n=0V4q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module and also you will need polyfills for fetch like [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\r\n\r\n```typescript\r\nimport \"isomorphic-fetch\";\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\r\n```\r\n\r\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\r\n\r\n```HTML\r\n<!-- polyfilling promise -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\r\n\r\n<!-- polyfilling fetch -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\r\n\r\n<!-- depending on your browser you might wanna include babel polyfill -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([ImplicitMSALAuthenticationProvider](src/ImplicitMSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Learn how you can create a [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\n\r\n// Configuration options for MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL.js-1.0.0-api-release#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new Msal.UserAgentApplication(msalConfig);\r\nconst options = new MicrosoftGraph.MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new MicrosoftGraph.ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\n#### Creating an instance of ImplicitMSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { ImplicitMSALAuthenticationProvider } from \"@microsoft/microsoft-graph-client/lib/src/ImplicitMSALAuthenticationProvider\";\r\nimport { MSALAuthenticationProviderOptions } from '@microsoft/microsoft-graph-client/lib/src/MSALAuthenticationProviderOptions';\r\n\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst msalConfig = {\r\n\tauth: {\r\n\t\tclientId: \"your_client_id\", // Client Id of the registered application\r\n\t\tredirectUri: \"your_redirect_uri\",\r\n\t},\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Important Note: This library implements loginPopup and acquireTokenPopup flow, remember this while initializing the msal\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js#1-instantiate-the-useragentapplication\r\nconst msalApplication = new UserAgentApplication(msalConfig);\r\nconst options = new MSALAuthenticationProviderOptions(graphScopes);\r\nconst authProvider = new ImplicitMSALAuthenticationProvider(msalApplication, options);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Build Angular single-page apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-angularspa)\r\n-   [Build Node.js Express apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-nodeexpressapp)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","gitHead":"ff5df0c93a2e72793daf141ab184ede5dc0f881c","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.14.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"14.15.0","dependencies":{"tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^12.0.10","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^5.0.0","rollup-plugin-commonjs":"^10.0.1","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^5.2.0","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.2.0-Preview.1_1605746615439_0.01812673755104055","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"@microsoft/microsoft-graph-client","version":"2.2.0","license":"MIT","_id":"@microsoft/microsoft-graph-client@2.2.0","maintainers":[{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"eed4de958771e50f62eada36adbdeeed5ebd79e0","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.2.0.tgz","fileCount":377,"integrity":"sha512-GfgqjgvogwLDQzyWXt9iceZWhDK8jTu3mVCPeaCWmz0Ko+gygBCMHGyKVXjmhvFQK4ZDkzDWVKoWUOozyzHKJA==","signatures":[{"sig":"MEUCIQDD8yVk9I/bCS/WD4UycCcnw6FIzXpSBPQhec8xWErUOwIgPT86p14cBML0bedzWwbdiFOw87f28a4irS9J5FZtGfY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1141794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxVYJCRA9TVsSAnZWagAAKwIP/itFghqriY9LU5IKGvLc\nlvAUn4rIK246HlBNQ44xdGYs4cN1iVi8jx7XddvoLimLJIk4Tzh+lZjf8RUn\nKhOyM5WffJ1mFe6QxHK3ELEjeBBh3jDE/vA1ZdEcurGqiEJLJECYMEEaZWS6\nRSgiUetQV0kQKekwt7iKA0mGTQhWMkjXOQ+nl5OpFHoCZlXCrbMS+mtJ7si2\npSqQVckO5saxR8HQ491iuydzFqtyXpYCLXLv73VG8IEpcNaByUQWYNaiquE0\na3H3+FWU3xZ5xZG9quvjdmraX2U1zvccZneI0enboEeJ3oOhIlV6mE+lk7vO\nF0t01mOn/AQ4TsOQNi6nZcyQuEJKGtM2tiizD2DeLmdvc+2ixT/eUrriUruc\nDYVnkimkcyipG30SORw4R8lf6t1CLpfX1T2dMZozBM3sNdDTmtx+MvEwaeHL\nPgnaYjdS1JZYlDjgECf9VPI4GW35f6RZiLDcnbMHITrnRT6Pl+e/Z1L5wPh9\nkKKh/eaZZ9jyVVDaCRy7sgIC88H9S83OUeb+byYhgVZwVDfD9h/N7bCf0+WJ\nDxRNuWUpYyl835Ko9RAo/unpCKl7U58ix9ssEGas3ykTDgM2iq28vJHLsKOy\nPYZhO92CMPAxwt6IQT18kdzdR54aZv3HMq1Qa89F58bZM+wnr7qSLnO+aK93\nHr99\r\n=GC7Q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/index.js","gitHead":"a67b3483f7649f50445c37ef560acb22a5f0b336","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.14.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"14.15.0","dependencies":{"tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^12.0.10","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^5.0.0","rollup-plugin-commonjs":"^10.0.1","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^5.2.0","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.2.0_1606768136155_0.649449551646075","host":"s3://npm-registry-packages"}},"2.2.1":{"name":"@microsoft/microsoft-graph-client","version":"2.2.1","license":"MIT","_id":"@microsoft/microsoft-graph-client@2.2.1","maintainers":[{"name":"microsoft","email":"npmjs@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"dist":{"shasum":"0ef045e1210551f234466a234bb0c60ea2ad8334","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-2.2.1.tgz","fileCount":377,"integrity":"sha512-fbDN3UJ+jtSP9llAejqmslMcv498YuIrS3OS/Luivb8OSjdUESZKdP0gcUunnuNIayePVT0/bGYSJTzAIptJQQ==","signatures":[{"sig":"MEYCIQDIIx+r9OxrhCqmFZMC96Gl+xiHlx44UfKRrcqHD6Wl9gIhALaZvA0EPFq4KSn2730WAN1FLftxEA74wlx/SSU3/532","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1141794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxreCCRA9TVsSAnZWagAAdHkP/3O7OJMQ9ck94xRCjObu\nRgqdEWKh9+1kMJYVizDr89IBXwF+uUZwJ7QcpcwhtcC3wZ1PB7qi7nJl4miW\nh3O0fYv/ZkCQH+XqMtWVO+puzWvTBR3bninbIUH5Ptq7LOhhw8Xg+GQiZQlW\nnEDuSLIHf8/ieVfvQ8tooYAGuRGkeJ/EiSLKRIz9jDKaR4m7/BUu4tCbzEbi\n0pvstnpUDzy5nN+Jmr8Mh8VvVcy+awy/ixE77a+0AsBDhwGe8iovjcxwLXDm\nGe2mR/dPkcybbHhMqE+9KRyzML+WH2yHrcpGOTwO/NnEgAj/l/M7HfFi26Zf\niRpsQZaSxgui3fAUDEWfZYV4sNG8UgovuJRClW6cM9L14Vh1JypUY4yjLkwI\nTpWAatO68gwQgodndJYnJBqQCvMbskg739ICCIV55s2mmlVxrtk3sqUdbKy4\npgswlCq+oCf49mXYL8AD86uuhkqrU3Kj1KWcc/m7iwqAkTi0ZgGQ3x0bqtnw\nXRZpuhTioFo/uBMWZicSq6d5UgsZFszg0WwBF+8EZCpt1/ycMYlE8UflpE8Y\niObiJrjteSxhBn0595kqvCDjHa+67LrksrMnzZJNZhqWJpJjCksT2n1OoRrL\nLPExRP67PJ+hRwx4CRxpr2TkJftSmbWoS7CcSGCb43W0SHQE9YbK0DtKv31Z\nVoCG\r\n=sZVy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/index.js","gitHead":"9ab641d3274e74f4358e0bdf257b27e820e90893","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/core && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","test:core":"tsc --p spec/tsconfig.json && mocha spec/core","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.14.8","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"14.15.0","dependencies":{"msal":"^1.4.4","tslib":"^1.9.3","@babel/runtime":"^7.4.4"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","husky":"^2.2.0","mocha":"^6.1.4","rollup":"^1.10.1","tslint":"^5.16.0","prettier":"^1.17.0","uglify-es":"^3.3.9","typescript":"^3.4.5","@babel/core":"^7.4.4","@types/node":"^12.0.10","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","isomorphic-fetch":"^2.2.1","@babel/preset-env":"^7.4.4","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^5.0.0","rollup-plugin-commonjs":"^10.0.1","tslint-config-prettier":"^1.18.0","rollup-plugin-node-resolve":"^5.2.0","@babel/plugin-transform-runtime":"^7.4.4"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_2.2.1_1606858625510_0.1903987139833263","host":"s3://npm-registry-packages"}},"3.0.0-Preview.1":{"name":"@microsoft/microsoft-graph-client","version":"3.0.0-Preview.1","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@3.0.0-Preview.1","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"ab7d94f1bd78ab4ae50488dc551f1ba91c08de33","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.0-Preview.1.tgz","fileCount":445,"integrity":"sha512-xCU8AKau/m58UNHNNiatQdOJkKZ8vuEB24TtCH+RbPoN58W7wrPadje2WokwPRmSf6WvqYtPbBY4EkfmvbwPVA==","signatures":[{"sig":"MEUCIFWoxl8W/SDGl3LLtJK3f/e3nG7eqh4ZhN/x1u2/LWLCAiEA00i1hw9anLo5riNEdlSHRGTgMe8eOa6An6dxgBT0oKo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1226437,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghwrcCRA9TVsSAnZWagAApCAP/R1Fj+jpzzLn4MlJUkL2\nE/XtaME4FHPVqkZILkdOK/U2LR5jiWCdq3aj7DctveFLltjOFp+NOe5i3tnU\nhgk/DhRqO2kf1PZVBnDQX6W81yshg27Dh3CczTt3QEmISyNV/UDam0xDjN7x\nBPKx8U8od9PTKTFGmZMISps9U4yodXKMdwdYulYJ2iO7gMXUHGV5a3UStcCE\nsyi1DGqtWkQ/5SUJ8C38FtSMj9iLRVjux3j3YDkNYBBrcuQ9M+JEfOURf18C\ndZUk8FZSzrHw5wCq5e5JPYRiWwnuCjBhsje9hRYZydaLb682dPMkK/zlSvW2\nSxb7LgwsafcbmTeiAPjYsx1L1rivfrwN8PELuruDqyVJ8X3/MHVzI8z4kFaa\n0isTfoUg+ZKMgQmxFj7Rf//gAlmYXrEupExOqeFiYcqSyX4xLwyyABH9DHJc\nkGYPSlCCIszv3kb4VrechBvRKc9pf9wJ0eQFyByoE2jNV8hyIaHWP5zFPiji\nkv5tjmKLOq/85oy6309DUw+2woLM2WXOspIQY3SQMOg7nKLY9mj4bP1Ai/82\nu+fTAdrXSUlDB5Fx7ioKiRxLyChIt0a3dWipejwfcmAlyOyaeuolOZOofcqg\n9rahGPcHieQDow/5OukHdgNq1GLSj/fw5tvS3np7lbYn0A40b/W36vFgFVX7\nopWJ\r\n=l3F3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n-   [Microsoft Graph JavaScript Client Library](#microsoft-graph-javascript-client-library)\r\n    -   [Installation](#installation)\r\n        -   [Via npm](#via-npm)\r\n        -   [Via Script Tag](#via-script-tag)\r\n    -   [Getting started](#getting-started)\r\n        -   [1. Register your application](#1-register-your-application)\r\n        -   [2. Create a Client Instance](#2-create-a-client-instance)\r\n        -   [3. Make requests to the graph](#3-make-requests-to-the-graph)\r\n    -   Documentation\r\n        -   [HTTP Actions](docs/Actions.md)\r\n        -   [Chained APIs to call Microsoft Graph](docs/CallingPattern.md)\r\n        -   [OData system query options - Query Parameters](docs/QueryParameters.md)\r\n        -   [Batch multiple requests into single HTTP request](docs/content/Batching.md)\r\n        -   [Cancel a HTTP request](docs/CancellingAHTTPRequest.md)\r\n        -   [Configurations to your request](docs/OtherAPIs.md)\r\n            -   [Query](docs/OtherAPIs.md#QUERY)\r\n            -   [Version](docs/OtherAPIs.md#VERSION)\r\n            -   [Headers](docs/OtherAPIs.md#HEADER-AND-HEADERS)\r\n            -   [Options](docs/OtherAPIs.md#OPTION-AND-OPTIONS)\r\n            -   [MiddlewareOptions](docs/OtherAPIs.md#MIDDLEWAREOPTIONS)\r\n            -   [ResponseType](docs/OtherAPIs.md#RESPONSETYPE)\r\n        -   [Upload large files to OneDrive, Outlook, Print API](docs/tasks/LargeFileUploadTask.md)\r\n        -   [Page Iteration](docs/tasks/PageIterator.md)\r\n        -   [Getting Raw Response](docs/GettingRawResponse.md)\r\n        -   [Creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)\r\n    -   [Questions and comments](#questions-and-comments)\r\n    -   [Contributing](#contributing)\r\n    -   [Additional resources](#additional-resources)\r\n    -   [Third Party Notices](#third-party-notices)\r\n    -   [Security Reporting](#security-reporting)\r\n    -   [License](#license)\r\n    -   [We Value and Adhere to the Microsoft Open Source Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Node version requirement\r\n\r\nNode.js 10 LTS or higher.\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module.\r\n\r\nAlso, you will need to import any fetch polyfill which suits your requirements. Following are some fetch polyfills -\r\n\r\n-   [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\r\n-   [cross-fetch](https://www.npmjs.com/package/cross-fetch)\r\n-   [whatwg-fetch](https://www.npmjs.com/package/whatwg-fetch)\r\n\r\n```typescript\r\nimport \"isomorphic-fetch\"; // or import the fetch polyfill you installed\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\r\n```\r\n\r\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\r\n\r\n```HTML\r\n<!-- polyfilling promise -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\r\n\r\n<!-- polyfilling fetch -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\r\n\r\n<!-- depending on your browser you might wanna include babel polyfill -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nTo call Microsoft Graph, your app must acquire an access token from the Microsoft identity platform. Learn more about this -\r\n\r\n-   [Authentication and authorization basics for Microsoft Graph](https://docs.microsoft.com/en-us/graph/auth/auth-concepts)\r\n-   [Register your app with the Microsoft identity platform](https://docs.microsoft.com/en-us/graph/auth/auth-concepts)\r\n\r\n### 2. Create a Client Instance\r\n\r\nThe Microsoft Graph client is designed to make it simple to make calls to Microsoft Graph. You can use a single client instance for the lifetime of the application.\r\n\r\nFor information on how to create a client instance, see [Creating Client Instance](./docs/CreatingClientInstance.md)\r\n\r\n### 3. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nExample of getting user details:\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nExample of sending an email to the recipients:\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n\r\n-   The Microsoft Graph TypeScript definitions enable editors to provide intellisense on Microsoft Graph objects including users, messages, and groups.\r\n    -   [@microsoft/microsoft-graph-types](https://www.npmjs.com/package/@microsoft/microsoft-graph-types) or [@types/microsoft-graph](https://www.npmjs.com/package/@types/microsoft-graph)\r\n    -   [@microsoft/microsoft-graph-types-beta](https://www.npmjs.com/package/@microsoft/microsoft-graph-types-beta)\r\n-   [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/en-us/graph/tutorials/react-native)\r\n-   [Build Angular single-page apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-angularspa)\r\n-   [Build Node.js Express apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-nodeexpressapp)\r\n-   [Microsoft Graph Toolkit: UI Components and Authentication Providers for Microsoft Graph](https://docs.microsoft.com/en-us/graph/toolkit/overview)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=10.0.0"},"gitHead":"5dd013a2512e4ec96fdb31e0942f804f7c8ef367","scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run test:esm","build":"npm run pre-build && npm run build:sub_cjs && npm run build:sub_es && rollup -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:sub_cjs   && mocha  'lib/test/common/**/*.js' --require  isomorphic-fetch &&  mocha  'lib/test/node/**/*.js' --require  isomorphic-fetch","test:esm":"npm run build:sub_es  && mocha  'lib/es/test/common/**/*.js' --require  esm --require  isomorphic-fetch &&  mocha  'lib/es/test/node/**/*.js' --require  esm --require  isomorphic-fetch","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","build:sub_es":"tsc -b tsconfig-sub-es.json","build:sub_cjs":"tsc -b tsconfig-sub-cjs.json","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.14.12","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"14.16.1","dependencies":{"tslib":"^2.2.0","@babel/runtime":"^7.12.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"esm":"^3.2.25","nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","karma":"^5.2.3","mocha":"^6.2.3","sinon":"^9.2.4","eslint":"^7.19.0","rollup":"^2.36.2","ts-node":"^9.0.0","prettier":"^1.17.0","form-data":"^2.3.3","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^4.2.4","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^12.0.10","karma-mocha":"^2.0.1","lint-staged":"^8.1.5","@types/mocha":"^5.2.7","@types/sinon":"^9.0.9","@azure/identity":"^1.3.0","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@rollup/plugin-babel":"^5.2.2","rollup-plugin-terser":"^7.0.2","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^7.2.0","eslint-plugin-prettier":"^3.3.1","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^17.0.0","@typescript-eslint/parser":"^3.8.0","@rollup/plugin-node-resolve":"^11.1.0","@babel/plugin-transform-runtime":"^7.12.10","@microsoft/microsoft-graph-types":"^1.28.0","@typescript-eslint/eslint-plugin":"^3.8.0","eslint-plugin-simple-import-sort":"^7.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"msal":{"optional":true},"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_3.0.0-Preview.1_1619462876070_0.7276679445302412","host":"s3://npm-registry-packages"}},"3.0.0-Preview.2":{"name":"@microsoft/microsoft-graph-client","version":"3.0.0-Preview.2","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@3.0.0-Preview.2","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},{"name":"muthurathinam","email":"mumuthus@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"dcaad3be61cbaac68dd8107ecb2b6938a8db36be","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.0-Preview.2.tgz","fileCount":445,"integrity":"sha512-WusaJzx4A056x9LzceEVqIIVhRHnhsVA5ZSxXEiZVrpwvAZsxxt2AF5cRgMbq2z2zlmnFGMynIGk7s2bQljI/A==","signatures":[{"sig":"MEYCIQDogB/MuJX/JPQZaPRtjV10dhiMfCrDtQqDtu54aYVpSAIhAK68XCqxjTyVKtUtMhu5Qu9SEmYPipH54uM7yu7X4wEw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1250051,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv+9kCRA9TVsSAnZWagAAG9IP/3AU6Rr7deS6n6qkUfpU\nfbRLggDRUun6H3Vn74uylBrXxJM+wPFYvGq8aokb7n10X7P2YOpMj6/vYNRO\n/EPAm8NuyV9SjRPCJZKQGokQrhxOjEPXKHjzfSIHvQpIuqpsKasfn4SIO288\noQUJNSJGuj0xNgGcokbWfDL0GyBv0/24P78kDQ/r4rtrDzeS0E8NQJ37RQUp\nie9AEgOEVGLK7sJEna3tYEL3DEsveYwlnrcHoOUbVB4OFaiBmLetJHaG/4ke\nv68/m9seE7tRVZJly1w4hUvsjn91D1BPWBwd+QzFjO7mDh3F08Er190bE90B\nHfZesLhFxxEMc88S2ocMYhb44SznXSEwdk2l9F5QJaskEmIUHwaJtIlUgLul\nO5rNYcZGhzY1kABiGh6ueauWU+GmtgSEz8k7Hq1CpQXMYwgf2F+lUYb9OD4h\nr7FjeyvbbwZyIc/1Mi/IAjcB6ODbTlsqyqx8Zp1puWewlxvfRvYImP4IgqzN\nb0+izgeHqSMX0J4prJ29/XakIO2MYxhk24cFnAJ1Mo94XbFjsm6T2TiCjeWg\nzF4w2fudHsLYeuxWcQ1Rf9GU2fWc0FdVq3Lr+Y32t/7Gr3/62z89yIqroddS\nAOj3+OyrrGeYdmDNxeWuTPaJmE/+hdlZg5XYMp91Kf5DJCJXeZm+7uZ8Bvv/\nYT+N\r\n=qg9m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n-   [Microsoft Graph JavaScript Client Library](#microsoft-graph-javascript-client-library)\r\n    -   [Installation](#installation)\r\n        -   [Via npm](#via-npm)\r\n        -   [Via Script Tag](#via-script-tag)\r\n    -   [Getting started](#getting-started)\r\n        -   [1. Register your application](#1-register-your-application)\r\n        -   [2. Create a Client Instance](#2-create-a-client-instance)\r\n        -   [3. Make requests to the graph](#3-make-requests-to-the-graph)\r\n    -   Documentation\r\n        -   [HTTP Actions](docs/Actions.md)\r\n        -   [Chained APIs to call Microsoft Graph](docs/CallingPattern.md)\r\n        -   [OData system query options - Query Parameters](docs/QueryParameters.md)\r\n        -   [Batch multiple requests into single HTTP request](docs/content/Batching.md)\r\n        -   [Cancel a HTTP request](docs/CancellingAHTTPRequest.md)\r\n        -   [Configurations to your request](docs/OtherAPIs.md)\r\n            -   [Query](docs/OtherAPIs.md#QUERY)\r\n            -   [Version](docs/OtherAPIs.md#VERSION)\r\n            -   [Headers](docs/OtherAPIs.md#HEADER-AND-HEADERS)\r\n            -   [Options](docs/OtherAPIs.md#OPTION-AND-OPTIONS)\r\n            -   [MiddlewareOptions](docs/OtherAPIs.md#MIDDLEWAREOPTIONS)\r\n            -   [ResponseType](docs/OtherAPIs.md#RESPONSETYPE)\r\n        -   [Upload large files to OneDrive, Outlook, Print API](docs/tasks/LargeFileUploadTask.md)\r\n        -   [Page Iteration](docs/tasks/PageIterator.md)\r\n        -   [Getting Raw Response](docs/GettingRawResponse.md)\r\n        -   [Creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)\r\n    -   [Questions and comments](#questions-and-comments)\r\n    -   [Contributing](#contributing)\r\n    -   [Additional resources](#additional-resources)\r\n    -   [Third Party Notices](#third-party-notices)\r\n    -   [Security Reporting](#security-reporting)\r\n    -   [License](#license)\r\n    -   [We Value and Adhere to the Microsoft Open Source Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Node version requirement\r\n\r\nNode.js 10 LTS or higher.\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module.\r\n\r\nAlso, you will need to import any fetch polyfill which suits your requirements. Following are some fetch polyfills -\r\n\r\n-   [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\r\n-   [cross-fetch](https://www.npmjs.com/package/cross-fetch)\r\n-   [whatwg-fetch](https://www.npmjs.com/package/whatwg-fetch)\r\n\r\n```typescript\r\nimport \"isomorphic-fetch\"; // or import the fetch polyfill you installed\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\r\n```\r\n\r\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\r\n\r\n```HTML\r\n<!-- polyfilling promise -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\r\n\r\n<!-- polyfilling fetch -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\r\n\r\n<!-- depending on your browser you might wanna include babel polyfill -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nTo call Microsoft Graph, your app must acquire an access token from the Microsoft identity platform. Learn more about this -\r\n\r\n-   [Authentication and authorization basics for Microsoft Graph](https://docs.microsoft.com/en-us/graph/auth/auth-concepts)\r\n-   [Register your app with the Microsoft identity platform](https://docs.microsoft.com/en-us/graph/auth/auth-concepts)\r\n\r\n### 2. Create a Client Instance\r\n\r\nThe Microsoft Graph client is designed to make it simple to make calls to Microsoft Graph. You can use a single client instance for the lifetime of the application.\r\n\r\nFor information on how to create a client instance, see [Creating Client Instance](./docs/CreatingClientInstance.md)\r\n\r\n### 3. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nExample of getting user details:\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nExample of sending an email to the recipients:\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n\r\n-   The Microsoft Graph TypeScript definitions enable editors to provide intellisense on Microsoft Graph objects including users, messages, and groups.\r\n    -   [@microsoft/microsoft-graph-types](https://www.npmjs.com/package/@microsoft/microsoft-graph-types) or [@types/microsoft-graph](https://www.npmjs.com/package/@types/microsoft-graph)\r\n    -   [@microsoft/microsoft-graph-types-beta](https://www.npmjs.com/package/@microsoft/microsoft-graph-types-beta)\r\n-   [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/en-us/graph/tutorials/react-native)\r\n-   [Build Angular single-page apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-angularspa)\r\n-   [Build Node.js Express apps with Microsoft Graph](https://github.com/microsoftgraph/msgraph-training-nodeexpressapp)\r\n-   [Microsoft Graph Toolkit: UI Components and Authentication Providers for Microsoft Graph](https://docs.microsoft.com/en-us/graph/toolkit/overview)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=10.0.0"},"gitHead":"55f15d622c13886627ff65a715cd0457e8de8521","scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run test:esm","build":"npm run pre-build && npm run build:sub_cjs && npm run build:sub_es && rollup -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:sub_cjs   && mocha  'lib/test/common/**/*.js' --require  isomorphic-fetch &&  mocha  'lib/test/node/**/*.js' --require  isomorphic-fetch","test:esm":"npm run build:sub_es  && mocha  'lib/es/test/common/**/*.js' --require  esm --require  isomorphic-fetch &&  mocha  'lib/es/test/node/**/*.js' --require  esm --require  isomorphic-fetch","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","build:sub_es":"tsc -b tsconfig-sub-es.json","build:sub_cjs":"tsc -b tsconfig-sub-cjs.json","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.14.13","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"14.17.0","dependencies":{"tslib":"^2.2.0","@babel/runtime":"^7.12.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"esm":"^3.2.25","nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","msal":"^1.0.0","husky":"^2.2.0","karma":"^6.3.2","mocha":"^6.2.3","sinon":"^9.2.4","eslint":"^7.19.0","rollup":"^2.36.2","ts-node":"^9.0.0","prettier":"^1.17.0","form-data":"^2.3.3","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^4.2.4","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^12.0.10","karma-mocha":"^2.0.1","lint-staged":"^11.0.0","@types/mocha":"^5.2.7","@types/sinon":"^9.0.9","@azure/identity":"^1.3.0","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@rollup/plugin-babel":"^5.2.2","rollup-plugin-terser":"^7.0.2","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^7.2.0","eslint-plugin-prettier":"^3.3.1","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^17.0.0","@typescript-eslint/parser":"^3.8.0","@rollup/plugin-node-resolve":"^11.1.0","@babel/plugin-transform-runtime":"^7.12.10","@microsoft/microsoft-graph-types":"^1.28.0","@typescript-eslint/eslint-plugin":"^3.8.0","eslint-plugin-simple-import-sort":"^7.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"msal":{"optional":true},"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_3.0.0-Preview.2_1623191395861_0.3951960977946487","host":"s3://npm-registry-packages"}},"3.0.0-Preview.3":{"name":"@microsoft/microsoft-graph-client","version":"3.0.0-Preview.3","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@3.0.0-Preview.3","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"28cbbe319b9f27e9a2d3269c17fe7c8034eeed13","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.0-Preview.3.tgz","fileCount":432,"integrity":"sha512-98zv4TTNfQgphJegkXKGywaJB6yC6vaZLis4OfjXaZRv6IW/mCQ7KGpk0t11qaR9xY2McMgCOBtXh0bzVYv2Vw==","signatures":[{"sig":"MEYCIQCcR7xuecwoLUrlDPAhLFhJC+QeYW9TPo64ZCJ1OxJXJAIhAMGcsfrm4GYZ4wmWDDdclIFAinajz8ibkp5Cje4N5Cqj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1236749,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAcrHCRA9TVsSAnZWagAAgMwQAI5C+A9Xik4FEVYA4w21\nQdaiWGQBDJK3DgzbmGL02rHjOp/V07u1OVrj8rlf8sB7ws+Sf1P2/fWXSLtG\nQuNLGH6UsIeEzw09ElMTkYvR0RzHXc5fWD/Y9jyJvfNHMbhHMycPIsSw6Rry\ncQvLCGoGC+1e5PjcSHF7A+imuwEQgBc2pZqWF7WOh4lbOPcuVS3SVFaAChBQ\ncfFqlqkQBhmPN8bSgsTE8J1QLCHjggF47uCw4sMobeF1vIpU3GxIzLhbHkB8\nX3sHrePRaNTvGU4QP2UsI950FB1vCLtiTR27eV2K7dElsU+zcdAlDgGq3l0b\nwGG247i4Fk87wdf216R6IsMtingfZc4fMxp5nHkZLGGSCFkFqq8rFq/QDiQO\nzv5+qa/qXGZvopyNsn/IlZrLLNffkr9uFenBVsqojQk+iIpXU4iHWqthl/vI\nZnCYG+8tGP5ejWEb9NH/HdnWc0CEGLH7QFGDUNKeklvzIFubYIIZx9gJk2jz\nORJz/sjGzb7xZu9jtK2sDwX/f2c4tKf2kBWRxpG+gDLFSVoBLy4sRhPBPB1C\ndsfxVfZRZuKldetmLGCP+Jih1vx9j8Ni80kwi6njlAH/kRvO2MXMW1Bz5NjY\nFOl+n0E8cVUCpTqFjwLTKWImhAWxuoyDsWvIOfXY114IdM/7BDBAq/St6en8\nEBCf\r\n=sSrn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n-   [Microsoft Graph JavaScript Client Library](#microsoft-graph-javascript-client-library)\r\n    -   [Installation](#installation)\r\n        -   [Via npm](#via-npm)\r\n        -   [Via Script Tag](#via-script-tag)\r\n    -   [Getting started](#getting-started)\r\n        -   [1. Register your application](#1-register-your-application)\r\n        -   [2. Create a Client Instance](#2-create-a-client-instance)\r\n        -   [3. Make requests to the graph](#3-make-requests-to-the-graph)\r\n    -   Documentation\r\n        -   [HTTP Actions](docs/Actions.md)\r\n        -   [Chained APIs to call Microsoft Graph](docs/CallingPattern.md)\r\n        -   [OData system query options - Query Parameters](docs/QueryParameters.md)\r\n        -   [Batch multiple requests into single HTTP request](docs/content/Batching.md)\r\n        -   [Cancel a HTTP request](docs/CancellingAHTTPRequest.md)\r\n        -   [Configurations to your request](docs/OtherAPIs.md)\r\n            -   [Query](docs/OtherAPIs.md#QUERY)\r\n            -   [Version](docs/OtherAPIs.md#VERSION)\r\n            -   [Headers](docs/OtherAPIs.md#HEADER-AND-HEADERS)\r\n            -   [Options](docs/OtherAPIs.md#OPTION-AND-OPTIONS)\r\n            -   [MiddlewareOptions](docs/OtherAPIs.md#MIDDLEWAREOPTIONS)\r\n            -   [ResponseType](docs/OtherAPIs.md#RESPONSETYPE)\r\n        -   [Upload large files to OneDrive, Outlook, Print API](docs/tasks/LargeFileUploadTask.md)\r\n        -   [Page Iteration](docs/tasks/PageIterator.md)\r\n        -   [Getting Raw Response](docs/GettingRawResponse.md)\r\n        -   [Creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)\r\n    -   [Samples and tutorials](#samples-and-tutorials)\r\n        -   Step-by-step training exercises on creating a basic application using the Microsoft Graph JavaScript SDK:\r\n            -   [Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)\r\n            -   [Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)\r\n            -   [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)\r\n            -   [Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)\r\n            -   [Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)\r\n            -   [Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)\r\n        -   Samples using `TokenCredentialAuthenticationProvider` with the `@azure/identity` library:\r\n            -   [TokenCredentialAuthenticationProvider Samples](samples/)\r\n        -   Samples using `LargeFileUploadTask` and `OneDriveLargeFileTask`:\r\n            -   [LargeFileUploadTask Samples](samples/)\r\n        -   Samples to learn more about authentication using `MSAL`libraries:\r\n            -   [Azure-Sample Vanilla JS SPA using MSAL Browser and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph)\r\n            -   [ Azure-Sample Angular SPA using MSAL Angular and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph)\r\n            -   [ Azure-Sample React SPA using MSAL React and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph)\r\n    -   [Questions and comments](#questions-and-comments)\r\n    -   [Contributing](#contributing)\r\n    -   [Additional resources](#additional-resources)\r\n    -   [Third Party Notices](#third-party-notices)\r\n    -   [Security Reporting](#security-reporting)\r\n    -   [License](#license)\r\n    -   [We Value and Adhere to the Microsoft Open Source Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the Microsoft Graph Types [v1.0](https://github.com/microsoftgraph/msgraph-typescript-typings) and [beta](https://github.com/microsoftgraph/msgraph-beta-typescript-typings)!!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Node version requirement\r\n\r\nNode.js 12 LTS or higher. The active Long Term Service (LTS) version of Node.js is used for on-going testing of existing and upcoming product features.\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module.\r\n\r\nAlso, you will need to import any fetch polyfill which suits your requirements. Following are some fetch polyfills -\r\n\r\n-   [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\r\n-   [cross-fetch](https://www.npmjs.com/package/cross-fetch)\r\n-   [whatwg-fetch](https://www.npmjs.com/package/whatwg-fetch)\r\n\r\n```typescript\r\nimport \"isomorphic-fetch\"; // or import the fetch polyfill you installed\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\r\n```\r\n\r\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\r\n\r\n```HTML\r\n<!-- polyfilling promise -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\r\n\r\n<!-- polyfilling fetch -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\r\n\r\n<!-- depending on your browser you might wanna include babel polyfill -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nTo call Microsoft Graph, your app must acquire an access token from the Microsoft identity platform. Learn more about this -\r\n\r\n-   [Authentication and authorization basics for Microsoft Graph](https://docs.microsoft.com/graph/auth/auth-concepts)\r\n-   [Register your app with the Microsoft identity platform](https://docs.microsoft.com/graph/auth/auth-concepts)\r\n\r\n### 2. Create a Client Instance\r\n\r\nThe Microsoft Graph client is designed to make it simple to make calls to Microsoft Graph. You can use a single client instance for the lifetime of the application.\r\n\r\nFor information on how to create a client instance, see [Creating Client Instance](./docs/CreatingClientInstance.md)\r\n\r\n### 3. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nExample of getting user details:\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nExample of sending an email to the recipients:\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Samples and tutorials\r\n\r\nStep-by-step training exercises that guide you through creating a basic application that accesses data via the Microsoft Graph:\r\n\r\n-   [Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)\r\n-   [Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)\r\n-   [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)\r\n-   [Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)\r\n-   [Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)\r\n-   [Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)\r\n\r\nThe Microsoft Graph JavaScript SDK provides a `TokenCredentialAuthenticationProvider` to authenticate using the `@azure/identity` auth library. Learn more:\r\n\r\n-   [Documentation for creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)\r\n-   [TokenCredentialAuthenticationProvider Samples](samples/)\r\n\r\nThe Microsoft Graph JavaScript SDK provides a `LargeFileUploadTask` to upload large files to OneDrive, Outlook and Print API:\r\n\r\n-   [LargeFileUploadTask documentation](docs/tasks/LargeFileUploadTask.md)\r\n-   [Samples using `LargeFileUploadTask` and `OneDriveLargeFileTask`](samples/) The following `MSAL` samples provide information on authentication using `MSAL` libraries and how to use the Microsoft Graph JavaScript SDK client with MSAL as a custom authentication provider to query the Graph API:\r\n\r\n-   [Azure-Sample Vanilla JS SPA using MSAL Browser and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph)\r\n-   [Azure-Sample Angular SPA using MSAL Angular and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph)\r\n-   [Azure-Sample React SPA using MSAL React and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   The Microsoft Graph TypeScript definitions enable editors to provide intellisense on Microsoft Graph objects including users, messages, and groups.\r\n    -   [@microsoft/microsoft-graph-types](https://www.npmjs.com/package/@microsoft/microsoft-graph-types) or [@types/microsoft-graph](https://www.npmjs.com/package/@types/microsoft-graph)\r\n    -   [@microsoft/microsoft-graph-types-beta](https://www.npmjs.com/package/@microsoft/microsoft-graph-types-beta)\r\n-   [Microsoft Graph Toolkit: UI Components and Authentication Providers for Microsoft Graph](https://docs.microsoft.com/graph/toolkit/overview)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=12.0.0"},"gitHead":"b34b89939be04411c98bdbd14b629fcec59c2f59","scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run test:esm","build":"npm run pre-build && npm run build:sub_cjs && npm run build:sub_es && rollup -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:sub_cjs   && mocha  'lib/test/common/**/*.js' --require  isomorphic-fetch &&  mocha  'lib/test/node/**/*.js' --require  isomorphic-fetch","test:esm":"npm run build:sub_es  && mocha  'lib/es/test/common/**/*.js' --require  esm --require  isomorphic-fetch &&  mocha  'lib/es/test/node/**/*.js' --require  esm --require  isomorphic-fetch","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","build:sub_es":"tsc -b tsconfig-sub-es.json","build:sub_cjs":"tsc -b tsconfig-sub-cjs.json","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.14.13","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"14.17.3","dependencies":{"tslib":"^2.2.0","@babel/runtime":"^7.12.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"esm":"^3.2.25","nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","husky":"^2.2.0","karma":"^6.3.2","mocha":"^6.2.3","sinon":"^9.2.4","eslint":"^7.19.0","rollup":"^2.36.2","ts-node":"^9.0.0","prettier":"^1.17.0","form-data":"^2.3.3","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^4.2.4","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^12.0.10","karma-mocha":"^2.0.1","lint-staged":"^11.0.0","@types/mocha":"^5.2.7","@types/sinon":"^9.0.9","@azure/identity":"^1.3.0","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@azure/msal-browser":"^2.15.0","@rollup/plugin-babel":"^5.2.2","rollup-plugin-terser":"^7.0.2","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^7.2.0","eslint-plugin-prettier":"^3.3.1","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^17.0.0","@typescript-eslint/parser":"^3.8.0","@rollup/plugin-node-resolve":"^11.1.0","@babel/plugin-transform-runtime":"^7.12.10","@microsoft/microsoft-graph-types":"^1.28.0","@typescript-eslint/eslint-plugin":"^3.8.0","eslint-plugin-simple-import-sort":"^7.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true},"@azure/msal-browser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_3.0.0-Preview.3_1627507399486_0.08727459169335927","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@microsoft/microsoft-graph-client","version":"3.0.0","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@3.0.0","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"939c952d9d38864b00e28408f524b5c924a1d136","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.0.tgz","fileCount":432,"integrity":"sha512-J2R1e6rIz7uF9J5C03ZTN2BYFCyZwZCHwBMNJ8w30DqWztG7w7sqFSZGTRcx0/f/T2bmhUEldC1/qF7yxNrQTA==","signatures":[{"sig":"MEYCIQCoUXfRIO1KRPmf7Tr5LUfagcOfGIP5s7hVImD7OeXhjgIhAKUHPkJDH4kSDx4p+5Rtjlpa7+2PgjmerjqP+dXUsoZx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1236675,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEaK+CRA9TVsSAnZWagAATFQP/ihfl0zCa0/IxMk5YuHD\nZwZJuxPDwClAuG56BhRAKx8TDGvlPCR+QDjUW/Zz5XQZLXer6Oab22BvCYbs\nbkouPxIvhFz3VTHGSCz+itjIMnVNJn3g9Xu1I+p+cpc8D7uiAFxYmp5wcD/9\nJDyfQrxIt5Hz+NsOcoxL0WQfgAmUgxI4U1wIGQwDumFzsS1XyWVFH/Yal+cK\nzl4RFcXgB6HRKGLBIxd9RCXvalarRkib39uCn0fmUlfZiIVg/VNJx2gkx8RG\nfOA4XNC9YZM94nRXtRe3IzIRPkoyz9OOSR9j0pKqxDM1BTU3U4WlC3dMXzOi\nDyT53eGb1cq3PElkY5aAYTfxUcFx7GmabFgQmpIQT7uHucs7ocOD4Lm6CcB+\nzPkpqEyL7/LkJ9uaP8vHcIf9v4h7rQI6InVISh06H3kbhfWk8OvqFFljmXLq\nnh54ngthNhf5B+OnVia3oT7NRUd8WPD+RxgjVVcD8+XlDtOnFMgNCzUTEc8B\nlH+pXVAf4wkZ78ydFxFnCKI7sg5JEQRCrYMJx091hOcmx6F8w5cR9W1ACoWz\nWm5ylWCAyXSscSSx37yyKASinPGm03J2I3gXll2oT9pBCiWtlmCKMeuwofuR\nbj9azLwyBE4Vzb9iUNlINsU5z10GXZxCNcnhIlxrLfgHSVThrocHR8r9IAs9\n7Zb9\r\n=aExN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=12.0.0"},"gitHead":"a3ee95d5d5fdc1a0210fcb990fc3ed639cb54dbb","scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run test:esm","build":"npm run pre-build && npm run build:sub_cjs && npm run build:sub_es && rollup -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:sub_cjs   && mocha  'lib/test/common/**/*.js' --require  isomorphic-fetch &&  mocha  'lib/test/node/**/*.js' --require  isomorphic-fetch","test:esm":"npm run build:sub_es  && mocha  'lib/es/test/common/**/*.js' --require  esm --require  isomorphic-fetch &&  mocha  'lib/es/test/node/**/*.js' --require  esm --require  isomorphic-fetch","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","build:sub_es":"tsc -b tsconfig-sub-es.json","build:sub_cjs":"tsc -b tsconfig-sub-cjs.json","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.14.14","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"14.17.4","dependencies":{"tslib":"^2.2.0","@babel/runtime":"^7.12.5"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","husky":"^2.2.0","karma":"^6.3.2","mocha":"^6.2.3","sinon":"^9.2.4","eslint":"^7.19.0","rollup":"^2.36.2","ts-node":"^9.0.0","prettier":"^1.17.0","form-data":"^2.3.3","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^4.2.4","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^12.0.10","karma-mocha":"^2.0.1","lint-staged":"^11.0.0","@types/mocha":"^5.2.7","@types/sinon":"^9.0.9","@azure/identity":"^1.3.0","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@azure/msal-browser":"^2.15.0","@rollup/plugin-babel":"^5.2.2","rollup-plugin-terser":"^7.0.2","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^7.2.0","eslint-plugin-prettier":"^3.3.1","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^17.0.0","@typescript-eslint/parser":"^3.8.0","@rollup/plugin-node-resolve":"^11.1.0","@babel/plugin-transform-runtime":"^7.12.10","@microsoft/microsoft-graph-types":"^1.28.0","@typescript-eslint/eslint-plugin":"^3.8.0","eslint-plugin-simple-import-sort":"^7.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true},"@azure/msal-browser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_3.0.0_1628545726399_0.22904609928179953","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"@microsoft/microsoft-graph-client","version":"3.0.1","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@3.0.1","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"f82152ae66a932b29ca2cf01ff4eb35bf4c62d05","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.1.tgz","fileCount":432,"integrity":"sha512-sudEc1kKMsdtEI6IZfnTL8JUQ1a7pmV7D/ID2n/fsZCZH3MKi2vZ9XeKZfnFAbgaGcNT2bl55w8fcV3vBljJXA==","signatures":[{"sig":"MEYCIQDoXD3r1mqQvLr6/QWFPmJ5iTUgJamCmGTjS1f6fVlc9QIhAM5g6DEHhKtfQ/7AcoMPDj0SSThsmEB9Y6MAmFqMKEPH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1256535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhkuUPCRA9TVsSAnZWagAArkUP/3EbxgBu2lgSie8N+x8E\naewrPWCO5Q0bjHsHarNi1+Izx8MzqSza6nfpmtnWct/NzqUazCEr0+LxJKbs\nko2XIOXvnSOqWU7ntQDX3cYombI+H4h7mjLFqkOsIU0i/OanlAjfnqcx7ePl\nzJDZA9tQwKxkr9PbKXyOFh9+P1ppmtRCkbNlA2jjnh0KjwZUlotU/uHtNZUW\nYV2jW4v0IzomHXO8EAcZAkMsGKU0N6fxaAcGcts4iB0b9WmqoF058Bha4q58\nlvCSDpB8GhmUX/Ixrf71Rga8uQj2y8e7XafatgIngn6mphWo52Xs1nsYhR+c\ntEsPA8XdMbCP66GJlpQR6hFMU8xVecS9B8Gaij77KfdApkUH51MNgMSUhnA0\nmfouyyP5YMpqIt1MkdTVWLCDoU1aAYCx+iAsyi4Smfe9d+XWfvCPyg4fjJcF\nZEWZVVuzrf37lEBCKg9z03jN32qNC4OjimaKbdaJ/1z9oA5vNa1cIUgB1njj\nAio+NRCSo6gGc15kcrW30aVeEjK/LuC0CCFvJ7anqvsBVZpAfm0eczSq7lG5\nNnLANpGEWhAD4SgKO8QY4teTgRlldCpW/ONQhK6WyEQfsFL2d9culQQBEyCR\nzFWRVn2AKSEWFudApQeTbGzyuytCZ0/ArqfrlSiCDdCWW21BMi2WLoLkt84R\nCEkz\r\n=LnHP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=12.0.0"},"gitHead":"5cf1dec4199fe958cd6cfdc640af26ece6c8c1c4","scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run test:esm","build":"npm run pre-build && npm run build:sub_cjs && npm run build:sub_es && rollup -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:sub_cjs   && mocha  'lib/test/common/**/*.js' --require  isomorphic-fetch &&  mocha  'lib/test/node/**/*.js' --require  isomorphic-fetch","test:esm":"npm run build:sub_es  && mocha  'lib/es/test/common/**/*.js' --require  esm --require  isomorphic-fetch &&  mocha  'lib/es/test/node/**/*.js' --require  esm --require  isomorphic-fetch","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","build:sub_es":"tsc -b tsconfig-sub-es.json","build:sub_cjs":"tsc -b tsconfig-sub-cjs.json","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"6.14.15","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"14.18.1","dependencies":{"tslib":"^2.2.0","@babel/runtime":"^7.12.5"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","husky":"^2.2.0","karma":"^6.3.2","mocha":"^6.2.3","sinon":"^9.2.4","eslint":"^7.19.0","rollup":"^2.36.2","ts-node":"^9.0.0","prettier":"^1.17.0","form-data":"^2.3.3","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^4.2.4","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^12.0.10","karma-mocha":"^2.0.1","lint-staged":"^11.0.0","@types/mocha":"^5.2.7","@types/sinon":"^9.0.9","@azure/identity":"^1.3.0","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@azure/msal-browser":"^2.15.0","@rollup/plugin-babel":"^5.2.2","rollup-plugin-terser":"^7.0.2","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^7.2.0","eslint-plugin-prettier":"^3.3.1","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^17.0.0","@typescript-eslint/parser":"^3.8.0","@rollup/plugin-node-resolve":"^11.1.0","@babel/plugin-transform-runtime":"^7.12.10","@microsoft/microsoft-graph-types":"^1.28.0","@typescript-eslint/eslint-plugin":"^3.8.0","eslint-plugin-simple-import-sort":"^7.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true},"@azure/msal-browser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_3.0.1_1637016847615_0.5261360585122918","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"@microsoft/microsoft-graph-client","version":"3.0.2","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@3.0.2","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"74b2ed8db24a3d2ad83f3f80b75b3d7ad78144fa","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.2.tgz","fileCount":432,"integrity":"sha512-eYDiApYmiGsm1s1jfAa/rhB2xQCsX4pWt0vCTd1LZmiApMQfT/c0hXj2hvpuGz5GrcLdugbu05xB79rIV57Pjw==","signatures":[{"sig":"MEYCIQD2HmJ6dmvnbACwGlTxwmgHNHgHPficFDQlrPdqOzirdAIhAMARViOiYUI4X8Drr5zQC+TLd3Jvi6CuWUFMWONDvkjK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1259080,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBEWXCRA9TVsSAnZWagAA9A8P+gK5PbVtfRq7CI5IQfw9\nKgwjS2a6P6DLHOOy38amELaZD7BUuV/p8pHl5UlYcMhYZQG6FPc3iNb+eUxz\nW24Ic0+DI96kNVJ4W7IYBPGXxtDE5LuM9JrbFq/0jUxLYsgblzD85BF1oetA\nj84iGO9EPhQm3d7X4TFR2czNEBC4dMK2djyYd1tmxiQ/vekuqxLAkWbz46Z4\nBiLX1Lmcd1bCWOJcPtz3+QwmI3NG0QSNvLqsD2ftDPXWXjJ9c+QXIz1bMYjl\nMI4nL4FWRqB6TpbIsl4mWyxOi8W6sXutrSWY7TkXE6gJqyltkl7zJCwK6CAi\nLY43z3y26YWWJTJYHtqHUSuVlF28kcLvRP03cuAOCxxrzmCNhFJNxgvmmdWz\nlG4L5hKdN4BKj30w1Ga2v0Z3nLnOzh6Yxm9BsoZexbQOByi/aAXq2KYLt8JE\nYiD947duXpM/UtCfYMh6shkKoa/UVL1wdkeEHaV+vdhZ0P46rfdVTVZ4QOZN\nu1L8KN9YpRbV1BNb65Y0bKSuygFx7Ofv8Tbv+UWR5j391GRbwYxWoKktPGDN\nZ04WbkpzObMa/Fcwtusuc3j6RhLqK24hl7TZbISGv3BSWPkjJPxLmifDQ0qJ\n2xQkyNfM7MsdUlStBY/O5kF6Cz/LLD2yKDhtNwx/Ds9kpCJg4OXWJkxMNjVi\nNnFb\r\n=OGPK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=12.0.0"},"gitHead":"7f901185b35003403eb823a8a8ef5fe9eda9ff27","scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run test:esm","build":"npm run pre-build && npm run build:sub_cjs && npm run build:sub_es && rollup -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:sub_cjs   && mocha  'lib/test/common/**/*.js' --require  isomorphic-fetch &&  mocha  'lib/test/node/**/*.js' --require  isomorphic-fetch","test:esm":"npm run build:sub_es  && mocha  'lib/es/test/common/**/*.js' --require  esm --require  isomorphic-fetch &&  mocha  'lib/es/test/node/**/*.js' --require  esm --require  isomorphic-fetch","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","build:sub_es":"tsc -b tsconfig-sub-es.json","build:sub_cjs":"tsc -b tsconfig-sub-cjs.json","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"8.1.2","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.2.0","@babel/runtime":"^7.12.5"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","husky":"^7.0.4","karma":"^6.3.2","mocha":"^6.2.3","sinon":"^13.0.1","eslint":"^7.19.0","rollup":"^2.36.2","ts-node":"^10.4.0","prettier":"^2.5.1","form-data":"^4.0.0","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^4.2.4","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^17.0.13","karma-mocha":"^2.0.1","lint-staged":"^12.3.1","@types/mocha":"^9.0.0","@types/sinon":"^10.0.8","@azure/identity":"^2.0.1","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@azure/msal-browser":"^2.15.0","@rollup/plugin-babel":"^5.2.2","rollup-plugin-terser":"^7.0.2","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^21.0.1","@typescript-eslint/parser":"^3.8.0","@rollup/plugin-node-resolve":"^13.1.3","@babel/plugin-transform-runtime":"^7.12.10","@microsoft/microsoft-graph-types":"^2.11.0","@typescript-eslint/eslint-plugin":"^4.0.0","eslint-plugin-simple-import-sort":"^7.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true},"@azure/msal-browser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_3.0.2_1644447127115_0.4487413679420196","host":"s3://npm-registry-packages"}},"4.0.0-Preview.1":{"name":"@microsoft/microsoft-graph-client","version":"4.0.0-Preview.1","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@4.0.0-Preview.1","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"0f303ce66e0d0e9eb08211a2b40e2d49f177657b","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-4.0.0-Preview.1.tgz","fileCount":313,"integrity":"sha512-8P4CWNMSDWr1fcyjCdyM84Kpn5VJi6+WPM3kWC6BKaXv5K2HJ0nifRhWzexIJTqjqzgb6RaMAcj2SC53QW/rrg==","signatures":[{"sig":"MEQCIGd8QbAzOmo1Vmrp3rtjOf9llFXgcbI8CeOo0YAhfFkpAiBwDOakA4gJWzEZtgibNhb03v5VM0SDOBv6TNAdrwi+YQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":980059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPMNKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6IQ//Yyb346+swwHa/ifAoGtDghcFg8D7H6zyFIwg4gTaia1alFcl\r\nUDl6TLc+0UJZWbTL3chmagpgod2JJugT8c7t9W/yCFujE0IuKf8WB24wFtKH\r\np6DATeUfjOZumW569TappYHPg5OBMh9SQo8cRWygY4fIDFZTBkJhCQ36jBba\r\n13RThhN/gx9Vi+UD3/xlA2FzHR6rkugYNGJJOXJHtE+i574r6zgiTvUqk01z\r\nXrA66YNmvY9iXHSis8yPN16AtwZKtYCEDDlJpXuh2d+GejHXUmJSOgTBYbhe\r\nSbrkMz8lkXXDdNbhfFwdFcZz+oAWJ7X487wTSYNy8IN1WeKpehIchkXHjWRM\r\nbz+wpojG9cjsSXxiUHd01kNC5yZ//nnFtRZrqfr+8AokzaVKxS87pV/xBlHm\r\nSLGC5vbP4WJzAUWZlkJjZpVfAg9WOor/0WvbHo/3W3ISipYU4NdC4poFEw2W\r\nSBFN3WdKTL/gbLfzkgyJUH27s8vcuqnBtsXG+SEhyQpEYgSZNzRvAa4FSgFu\r\nLHtOdkmwYrprT3y0opBBNT5C6zcDs8krdE+oE5tJraWztUMYxJGv8cuj8Uhr\r\nfRYaCHpVGdacst6aI/2XobatBnR4Fo2EafZWCbHEkwHa1fh5JOZgYjKFGIje\r\nBUNPj5URR9SLSQi8cWQu8331+80H5kp8fZM=\r\n=/5ql\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n-   [Microsoft Graph JavaScript Client Library](#microsoft-graph-javascript-client-library)\r\n    -   [Installation](#installation)\r\n        -   [Via npm](#via-npm)\r\n        -   [Via Script Tag](#via-script-tag)\r\n    -   [Getting started](#getting-started)\r\n        -   [1. Register your application](#1-register-your-application)\r\n        -   [2. Create a Client Instance](#2-create-a-client-instance)\r\n        -   [3. Make requests to the graph](#3-make-requests-to-the-graph)\r\n    -   Documentation\r\n        -   [HTTP Actions](docs/Actions.md)\r\n        -   [Chained APIs to call Microsoft Graph](docs/CallingPattern.md)\r\n        -   [OData system query options - Query Parameters](docs/QueryParameters.md)\r\n        -   [Batch multiple requests into single HTTP request](docs/content/Batching.md)\r\n        -   [Cancel a HTTP request](docs/CancellingAHTTPRequest.md)\r\n        -   [Configurations to your request](docs/OtherAPIs.md)\r\n            -   [Query](docs/OtherAPIs.md#QUERY)\r\n            -   [Version](docs/OtherAPIs.md#VERSION)\r\n            -   [Headers](docs/OtherAPIs.md#HEADER-AND-HEADERS)\r\n            -   [Options](docs/OtherAPIs.md#OPTION-AND-OPTIONS)\r\n            -   [MiddlewareOptions](docs/OtherAPIs.md#MIDDLEWAREOPTIONS)\r\n            -   [ResponseType](docs/OtherAPIs.md#RESPONSETYPE)\r\n        -   [Upload large files to OneDrive, Outlook, Print API](docs/tasks/LargeFileUploadTask.md)\r\n        -   [Page Iteration](docs/tasks/PageIterator.md)\r\n        -   [Getting Raw Response](docs/GettingRawResponse.md)\r\n        -   [Creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)\r\n    -   [Samples and tutorials](#samples-and-tutorials)\r\n        -   Step-by-step training exercises on creating a basic application using the Microsoft Graph JavaScript SDK:\r\n            -   [Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)\r\n            -   [Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)\r\n            -   [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)\r\n            -   [Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)\r\n            -   [Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)\r\n            -   [Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)\r\n        -   Samples using `TokenCredentialAuthenticationProvider` with the `@azure/identity` library:\r\n            -   [TokenCredentialAuthenticationProvider Samples](samples/)\r\n        -   Samples using `LargeFileUploadTask` and `OneDriveLargeFileTask`:\r\n            -   [LargeFileUploadTask Samples](samples/)\r\n        -   Samples to learn more about authentication using `MSAL`libraries:\r\n            -   [Azure-Sample Vanilla JS SPA using MSAL Browser and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph)\r\n            -   [ Azure-Sample Angular SPA using MSAL Angular and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph)\r\n            -   [ Azure-Sample React SPA using MSAL React and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph)\r\n    -   [Questions and comments](#questions-and-comments)\r\n    -   [Contributing](#contributing)\r\n    -   [Additional resources](#additional-resources)\r\n    -   [Third Party Notices](#third-party-notices)\r\n    -   [Security Reporting](#security-reporting)\r\n    -   [License](#license)\r\n    -   [We Value and Adhere to the Microsoft Open Source Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the Microsoft Graph Types [v1.0](https://github.com/microsoftgraph/msgraph-typescript-typings) and [beta](https://github.com/microsoftgraph/msgraph-beta-typescript-typings)!!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Node version requirement\r\n\r\nNode.js 12 LTS or higher. The active Long Term Service (LTS) version of Node.js is used for on-going testing of existing and upcoming product features.\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module.\r\n\r\nAlso, you will need to import any fetch polyfill which suits your requirements. Following are some fetch polyfills -\r\n\r\n-   [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\r\n-   [cross-fetch](https://www.npmjs.com/package/cross-fetch)\r\n-   [whatwg-fetch](https://www.npmjs.com/package/whatwg-fetch)\r\n\r\n```typescript\r\nimport \"isomorphic-fetch\"; // or import the fetch polyfill you installed\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\r\n```\r\n\r\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\r\n\r\n```HTML\r\n<!-- polyfilling promise -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\r\n\r\n<!-- polyfilling fetch -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\r\n\r\n<!-- depending on your browser you might wanna include babel polyfill -->\r\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nTo call Microsoft Graph, your app must acquire an access token from the Microsoft identity platform. Learn more about this -\r\n\r\n-   [Authentication and authorization basics for Microsoft Graph](https://docs.microsoft.com/graph/auth/auth-concepts)\r\n-   [Register your app with the Microsoft identity platform](https://docs.microsoft.com/graph/auth/auth-concepts)\r\n\r\n### 2. Create a Client Instance\r\n\r\nThe Microsoft Graph client is designed to make it simple to make calls to Microsoft Graph. You can use a single client instance for the lifetime of the application.\r\n\r\nFor information on how to create a client instance, see [Creating Client Instance](./docs/CreatingClientInstance.md)\r\n\r\n### 3. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nExample of getting user details:\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nExample of sending an email to the recipients:\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Samples and tutorials\r\n\r\nStep-by-step training exercises that guide you through creating a basic application that accesses data via the Microsoft Graph:\r\n\r\n-   [Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)\r\n-   [Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)\r\n-   [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)\r\n-   [Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)\r\n-   [Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)\r\n-   [Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)\r\n\r\nThe Microsoft Graph JavaScript SDK provides a `TokenCredentialAuthenticationProvider` to authenticate using the `@azure/identity` auth library. Learn more:\r\n\r\n-   [Documentation for creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)\r\n-   [TokenCredentialAuthenticationProvider Samples](samples/)\r\n\r\nThe Microsoft Graph JavaScript SDK provides a `LargeFileUploadTask` to upload large files to OneDrive, Outlook and Print API:\r\n\r\n-   [LargeFileUploadTask documentation](docs/tasks/LargeFileUploadTask.md)\r\n-   [Samples using `LargeFileUploadTask` and `OneDriveLargeFileTask`](samples/) The following `MSAL` samples provide information on authentication using `MSAL` libraries and how to use the Microsoft Graph JavaScript SDK client with MSAL as a custom authentication provider to query the Graph API:\r\n\r\n-   [Azure-Sample Vanilla JS SPA using MSAL Browser and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph)\r\n-   [Azure-Sample Angular SPA using MSAL Angular and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph)\r\n-   [Azure-Sample React SPA using MSAL React and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   The Microsoft Graph TypeScript definitions enable editors to provide intellisense on Microsoft Graph objects including users, messages, and groups.\r\n    -   [@microsoft/microsoft-graph-types](https://www.npmjs.com/package/@microsoft/microsoft-graph-types) or [@types/microsoft-graph](https://www.npmjs.com/package/@types/microsoft-graph)\r\n    -   [@microsoft/microsoft-graph-types-beta](https://www.npmjs.com/package/@microsoft/microsoft-graph-types-beta)\r\n-   [Microsoft Graph Toolkit: UI Components and Authentication Providers for Microsoft Graph](https://docs.microsoft.com/graph/toolkit/overview)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=12.0.0"},"gitHead":"0111233569e7bfd42869b80b33756fbeda2f5c18","scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run test:esm","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:cjs   && mocha  'lib/test/common/**/*.js' --require  isomorphic-fetch &&  mocha  'lib/test/node/**/*.js' --require  isomorphic-fetch","test:esm":"npm run build:es  && mocha  'lib/es/test/common/**/*.js' --require  esm --require  isomorphic-fetch &&  mocha  'lib/es/test/node/**/*.js' --require  esm --require  isomorphic-fetch","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"8.5.0","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"16.14.1","dependencies":{"tslib":"^2.2.0","@microsoft/kiota-abstractions":"^1.0.0-preview.1","@microsoft/kiota-http-fetchlibrary":"^1.0.0-preview.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"esm":"^3.2.25","nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","husky":"^7.0.4","karma":"^6.3.2","mocha":"^6.2.3","sinon":"^13.0.1","eslint":"^8.9.0","rollup":"^2.36.2","ts-node":"^10.4.0","prettier":"^2.5.1","form-data":"^4.0.0","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^4.2.4","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^17.0.13","karma-mocha":"^2.0.1","lint-staged":"^12.3.1","@types/mocha":"^9.0.0","@types/sinon":"^10.0.8","@babel/runtime":"^7.12.5","@azure/identity":"^2.0.1","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@azure/msal-browser":"^2.15.0","@rollup/plugin-babel":"^5.2.2","rollup-plugin-terser":"^7.0.2","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^21.0.1","@typescript-eslint/parser":"^5.12.1","@rollup/plugin-node-resolve":"^13.1.3","@babel/plugin-transform-runtime":"^7.12.10","@microsoft/microsoft-graph-types":"^2.11.0","@typescript-eslint/eslint-plugin":"^5.12.1","eslint-plugin-simple-import-sort":"^7.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true},"@azure/msal-browser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_4.0.0-Preview.1_1648149322243_0.5485988161220547","host":"s3://npm-registry-packages"}},"1.7.1-spfx":{"name":"@microsoft/microsoft-graph-client","version":"1.7.1-spfx","_id":"@microsoft/microsoft-graph-client@1.7.1-spfx","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.","dist":{"shasum":"9831a939cee2762a3646815d93e1ad4eed8e6404","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.1-spfx.tgz","fileCount":294,"integrity":"sha512-4GVAVQNJpmcjVtaAuMmeKbq3ssrmTJ/rQxqERX7coni0IrplRhbIrvogcrZR+o+jVxXljtyIXBDBm1xnCyGd6A==","signatures":[{"sig":"MEUCIQCHC/MRxQmqhuc7iK92jxl+t2yzSpoUry334lrHW/36mwIgTQUP4SPtcdyND4nQ1rMlIYX7/1RAGu8VzFUX2CLEWEQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1030861,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJis2zDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6XRAAkRpwqBKwsysbcGu8rzS4z68ASbC1xT9bExeK/s8CJdSY7eHP\r\nNbmi9jHZ18GhIqO8TcSHcyLwD2rdQPWiCdN8Gs7ElXv7SXbnLyiLxa3JfUUF\r\n2Tqa27LwA0zm7qfR4EwbZRKgs1+jZ0wdwuhmGo2Prg5JG6f4YwQhzvKMXEyy\r\n0cUjI1TUyem+c3ZLRHYR0T5ZNqw/jHzBzbtix6yBGrk3v1/iFc2HoHsoppSg\r\nM5AyDsexKGW2bSwqpwyUlNNLN1hkPctMp2HvK3SamA+JGtNuyPgYKR7dN93X\r\ntbsEXZHFy3Pr1mZqh0RXGS5FQBPu85crGxd9qw1Kl+3+3HAOIcCOPTa4W930\r\nIHkKIsU++301jVHURjQBUMslb1Su+O5f5ceorSN8EbG0WANhvjTSCQ6Q+DCh\r\nLDd0ilEJv1u8ppaPjKLIdDkE/zIvduFkQUuZhMeFUWKqQ9l+PQl+bdJ60q5+\r\nbNfQiwMPbwEDM+b4veCL0FCi2XULECg/tDpf4vvPUOG5viuf5HnbBvLzkyH+\r\nG2xfq/cu4HJPJIuZwU5ovBPcDr93gRGiiU6i1KB6c5RfiR3h7MLH/dhWkbxm\r\nsjfYDc3A0D1QhSO0vjDjbM/ibj7DSJPn8ytHbGSuBQcOyDUu7ZD6amUWeIgH\r\nJTkMMqrz7VB1vI3xM1Ri/pvmlxQ3IhJxt98=\r\n=PCee\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module.\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude `lib/graph-js-sdk-web.js` in your page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-web.js\"></script>\r\n```\r\n\r\nIncase if your application ships with [es6-promise](https://www.npmjs.com/package/es6-promise) and [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch) just use `lib/graph-js-sdk-core.js`\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-core.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([MSALAuthenticationProvider](src/MSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new Msal.UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, graphScopes);\r\n```\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { MSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/MSALAuthenticationProvider\";\r\n\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MSALAuthenticationProvider(userAgentApplication, scopes);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Angular.js sample using the JavaScript client library](https://github.com/microsoftgraph/angular-connect-sample)\r\n-   [Node.js sample using the JavaScript client library](https://github.com/microsoftgraph/nodejs-connect-sample)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","gitHead":"53aa662f47f8acde98266a92690f49381c65285e","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/content/node && mocha lib/spec/core && mocha lib/spec/core/node && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run build:cjs && npm run build:es && rollup -c && npm run web:js && npm run core:js","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","web:js":"node browserify-with-dependencies.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js","core:js":"node browserify.js > lib/graph-js-sdk-core.js && uglifyjs ./lib/graph-js-sdk-core.js --output ./lib/graph-js-sdk-core.js","prepack":"npm install && npm run build","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","test:core":"tsc --p spec/tsconfig.json && mocha spec/core && mocha spec/core/node","format:css":"prettier --write \"**/*.css\"","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content && mocha spec/content/node","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"8.11.0","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"16.15.1","dependencies":{"tslib":"^1.9.3","es6-promise":"^4.2.6","isomorphic-fetch":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","msal":"^0.2.4","husky":"^1.3.1","karma":"^6.3.2","mocha":"^6.1.3","rollup":"^1.10.0","tslint":"^5.15.0","prettier":"^1.17.0","uglify-es":"^3.3.9","browserify":"^16.2.3","karma-chai":"^0.1.0","typescript":"^3.4.3","@types/node":"^11.13.4","karma-mocha":"^2.0.1","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","karma-typescript":"^5.2.0","rollup-plugin-terser":"^4.0.4","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","tslint-config-prettier":"^1.18.0","@types/isomorphic-fetch":"0.0.35"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.7.1-spfx_1655925955282_0.898139644966562","host":"s3://npm-registry-packages"}},"1.7.2-spfx":{"name":"@microsoft/microsoft-graph-client","version":"1.7.2-spfx","_id":"@microsoft/microsoft-graph-client@1.7.2-spfx","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"//":"NOTE: The version here should match exactly the exported const PACKAGE_VERSION in Constants.ts. If you change it here, also change it there.","dist":{"shasum":"9476b594ccbb182e1883d2c63e80ea9f7fc3baac","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.7.2-spfx.tgz","fileCount":294,"integrity":"sha512-BQN50r3tohWYOaQ0de7LJ5eCRjI6eg4RQqLhGDlgRmZIZhWzH0bhR6QBMmmxtYtwKWifhPhJSxYDW+cP67TJVw==","signatures":[{"sig":"MEUCIQCo/KR+qA28jyeNWrqkD8jguMUz1R+toHfgxxMqi4lYvQIgRW+ac7kaOPQ+rY0WpPw1BUL4vB3oX3fBS5BbWzEPCSo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1030860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiu4PjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpXbg/+JiaUN6KFkcpoYgFZecrjDCL5DtAGTQUE+y2abtCWS4XY/fLu\r\nj5GgwgzWHk9YTAgsXGk7q/vQ7jBIaNFpQ4d9VYWohyw5ObqtWfAZuF0S2Xdb\r\nDAYF0PHOvc1MJYkpYIb160/CnG+FF2bZPFAZ/UaLDKaQs2p3sG5V0oXH5e3B\r\n/2EJ51hp0rxbKtuneBx/eOQ52+2j1fKh7ee1vdqZa/Nw19KkMkRIjzkWmPxh\r\n4BASRJKq5vwE+JlYSQhDWQAD1kxugXZQmPYxJYyBEXiG8nExYCBkJsFBOhSB\r\nx+XGtNFc9t/JcRut6fyHKhZfR5hpS/UmDk21tAsOwoWEtIrSB5GflINGlO1m\r\nFuNIHiB3fHL4xEz+kJR01a9PbjLyHo9k5pivUZJ4u0ffAsNJuZV2kLX8GFhL\r\nJaMhXtlNbczIJVaNEo5B2gH+7xBIOkZjiXS9wmEBJlK5DCfFmw9tefSFBMTI\r\nMxvM6jMi/LUmWIkAAIr9cGQzEA/Fopip9ZehYyCrEoe7rDjn206IDFCuxkKr\r\nkHMiKV5iNqy/JLHDTr8MP2JnM9Up2Mdql8p4hcnvj394Gcg7YMPwBQotlS5K\r\nK+A7sVfbViPCSQ3+1Nen0Tom3AENPLDPGL11+xTITOr3iw3DDexVBpOdu63E\r\nQiZSc9jvPgGMbeY17/tlPrsysrRsvg9g2oI=\r\n=hGww\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/index.js","readme":"# Microsoft Graph JavaScript Client Library\r\n\r\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Travis](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript.svg?maxAge=86400)](https://travis-ci.org/microsoftgraph/msgraph-sdk-javascript) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\r\n\r\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\r\n\r\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the [Microsoft Graph Types](https://github.com/microsoftgraph/msgraph-typescript-typings) repository!**\r\n\r\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\r\n\r\n## Installation\r\n\r\n### Via npm\r\n\r\n```cmd\r\nnpm install @microsoft/microsoft-graph-client\r\n```\r\n\r\nimport `@microsoft/microsoft-graph-client` into your module.\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n```\r\n\r\n### Via Script Tag\r\n\r\nInclude `lib/graph-js-sdk-web.js` in your page.\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-web.js\"></script>\r\n```\r\n\r\nIncase if your application ships with [es6-promise](https://www.npmjs.com/package/es6-promise) and [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch) just use `lib/graph-js-sdk-core.js`\r\n\r\n```HTML\r\n<script type=\"text/javascript\" src=\"graph-js-sdk-core.js\"></script>\r\n```\r\n\r\n## Getting started\r\n\r\n### 1. Register your application\r\n\r\nRegister your application to use Microsoft Graph API using one of the following supported authentication portals:\r\n\r\n-   [Microsoft Application Registration Portal](https://apps.dev.microsoft.com): Register a new application that works with Microsoft Accounts and/or organizational accounts using the unified V2 Authentication Endpoint.\r\n-   [Microsoft Azure Active Directory](https://manage.windowsazure.com): Register a new application in your tenant's Active Directory to support work or school users for your tenant or multiple tenants.\r\n\r\n### 2. Authenticate for the Microsoft Graph service\r\n\r\nThe Microsoft Graph JavaScript Client Library has an adapter implementation ([MSALAuthenticationProvider](src/MSALAuthenticationProvider.ts)) for [MSAL](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core) (Microsoft Authentication Library) which takes care of getting the `accessToken`. MSAL library does not ship with this library, user has to include it externally (For including MSAL, refer [this](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-core#installation)).\r\n\r\n> **Note:** MSAL is supported only for frontend applications, for server-side authentication you have to implement your own AuthenticationProvider. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in browser environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```html\r\n<script src=\"https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js\"></script>\r\n```\r\n\r\n```typescript\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new Msal.UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, graphScopes);\r\n```\r\n\r\n#### Creating an instance of MSALAuthenticationProvider in node environment\r\n\r\nRefer devDependencies in [package.json](./package.json) for the compatible msal version and update that version in below.\r\n\r\n```cmd\r\nnpm install msal@<version>\r\n```\r\n\r\n```typescript\r\nimport { UserAgentApplication } from \"msal\";\r\n\r\nimport { MSALAuthenticationProvider } from \"./node_modules/@microsoft/microsoft-graph-client/lib/src/MSALAuthenticationProvider\";\r\n\r\nconst clientId = \"your_client_id\"; // Client Id of the registered application\r\nconst callback = (errorDesc, token, error, tokenType) => {};\r\n// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options\r\nconst options = {\r\n\tredirectUri: \"Your redirect URI\",\r\n};\r\nconst graphScopes = [\"user.read\", \"mail.send\"]; // An array of graph scopes\r\n\r\n// Initialize the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#initialization-of-msal\r\nconst userAgentApplication = new UserAgentApplication(clientId, undefined, callback, options);\r\nconst authProvider = new MSALAuthenticationProvider(userAgentApplication, scopes);\r\n```\r\n\r\nUser can integrate own preferred authentication library by implementing `IAuthenticationProvider` interface. Refer implementing [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).\r\n\r\n### 3. Initialize a Microsoft Graph Client object with an authentication provider\r\n\r\nAn instance of the **Client** class handles requests to Microsoft Graph API and processing the responses. To create a new instance of this class, you need to provide an instance of [`IAuthenticationProvider`](src/IAuthenticationProvider.ts) which needs to be passed as a value for `authProvider` key in [`ClientOptions`](src/IClientOptions.ts) to a static initializer method `Client.initWithMiddleware`.\r\n\r\n#### For browser environment\r\n\r\n```typescript\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst Client = MicrosoftGraph.Client;\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\n#### For node environment\r\n\r\n```typescript\r\nimport { Client } from \"@microsoft/microsoft-graph-client\";\r\n\r\nconst options = {\r\n\tauthProvider, // An instance created from previous step\r\n};\r\nconst client = Client.initWithMiddleware(options);\r\n```\r\n\r\nFor more information on initializing client, refer [this document](./docs/CreatingClientInstance.md).\r\n\r\n### 4. Make requests to the graph\r\n\r\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should be start with `client.api(path)` and end with an [action](./docs/Actions.md).\r\n\r\nGetting user details\r\n\r\n```typescript\r\ntry {\r\n\tlet userDetails = await client.api(\"/me\").get();\r\n\tconsole.log(userDetails);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nSending an email to the recipients\r\n\r\n```typescript\r\n// Construct email object\r\nconst mail = {\r\n\tsubject: \"Microsoft Graph JavaScript Sample\",\r\n\ttoRecipients: [\r\n\t\t{\r\n\t\t\temailAddress: {\r\n\t\t\t\taddress: \"example@example.com\",\r\n\t\t\t},\r\n\t\t},\r\n\t],\r\n\tbody: {\r\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\r\n\t\tcontentType: \"html\",\r\n\t},\r\n};\r\ntry {\r\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\r\n\tconsole.log(response);\r\n} catch (error) {\r\n\tthrow error;\r\n}\r\n```\r\n\r\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\r\n\r\n## Documentation\r\n\r\n-   [Batching](docs/content/Batching.md)\r\n-   [Large File Upload Task](docs/tasks/LargeFileUploadTask.md)\r\n-   [Page Iterator](docs/tasks/PageIterator.md)\r\n-   [Actions](docs/Actions.md)\r\n-   [Query Parameters](docs/QueryParameters.md)\r\n-   [Other APIs](docs/OtherAPIs.md)\r\n-   [Getting Raw Response](docs/GettingRawResponse.md)\r\n\r\n## Questions and comments\r\n\r\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\r\n\r\n## Contributing\r\n\r\nPlease see the [contributing guidelines](CONTRIBUTING.md).\r\n\r\n## Additional resources\r\n\r\n-   [Microsoft Graph website](https://graph.microsoft.io)\r\n-   [Microsoft Graph TypeScript types](https://github.com/microsoftgraph/msgraph-typescript-typings/)\r\n-   [Angular.js sample using the JavaScript client library](https://github.com/microsoftgraph/angular-connect-sample)\r\n-   [Node.js sample using the JavaScript client library](https://github.com/microsoftgraph/nodejs-connect-sample)\r\n-   [Office Dev Center](http://dev.office.com/)\r\n\r\n## Third Party Notices\r\n\r\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\r\n\r\n## Security Reporting\r\n\r\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/en-us/security/dd252948) and subscribing to Security Advisory Alerts.\r\n\r\n## License\r\n\r\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\r\n\r\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","gitHead":"3a961826dc3451a5890e0eabb26c66e683e60f55","scripts":{"lint":"tslint --project ./tsconfig-cjs.json -c tslint.json","test":"npm run build:cjs && mocha lib/spec/content && mocha lib/spec/content/node && mocha lib/spec/core && mocha lib/spec/core/node && mocha lib/spec/middleware && mocha lib/spec/tasks","build":"npm run build:cjs && npm run build:es && rollup -c && npm run web:js && npm run core:js","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","web:js":"node browserify-with-dependencies.js > lib/graph-js-sdk-web.js && uglifyjs ./lib/graph-js-sdk-web.js --output ./lib/graph-js-sdk-web.js","core:js":"node browserify.js > lib/graph-js-sdk-core.js && uglifyjs ./lib/graph-js-sdk-core.js --output ./lib/graph-js-sdk-core.js","prepack":"npm install && npm run build","build:es":"tsc --p tsconfig-es.json","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","test:core":"tsc --p spec/tsconfig.json && mocha spec/core && mocha spec/core/node","format:css":"prettier --write \"**/*.css\"","test:tasks":"tsc --p spec/tsconfig.json && mocha spec/tasks","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:content":"tsc --p spec/tsconfig.json && mocha spec/content && mocha spec/content/node","test:workload":"tsc --p spec/tsconfig.json && mocha spec/development/workload","test:middleware":"tsc --p spec/tsconfig.json && mocha spec/middleware","test:development":"tsc --p spec/tsconfig.json && mocha spec/development/workload"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"8.11.0","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"16.15.1","dependencies":{"tslib":"^1.9.3","es6-promise":"^4.2.6","isomorphic-fetch":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","msal":"^0.2.4","husky":"^1.3.1","karma":"^6.3.2","mocha":"^6.1.3","rollup":"^1.10.0","tslint":"^5.15.0","prettier":"^1.17.0","uglify-es":"^3.3.9","browserify":"^16.2.3","karma-chai":"^0.1.0","typescript":"^3.4.3","@types/node":"^11.13.4","karma-mocha":"^2.0.1","lint-staged":"^8.1.5","@types/mocha":"^5.2.6","karma-typescript":"^5.2.0","rollup-plugin-terser":"^4.0.4","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","tslint-config-prettier":"^1.18.0","@types/isomorphic-fetch":"0.0.35"},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_1.7.2-spfx_1656456163699_0.6147902850009781","host":"s3://npm-registry-packages"}},"4.0.0-RestPreview.1":{"name":"@microsoft/microsoft-graph-client","version":"4.0.0-RestPreview.1","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@4.0.0-RestPreview.1","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"7fe51df62f0d7e3dc4647f3808d98c2483414a07","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-4.0.0-RestPreview.1.tgz","fileCount":400,"integrity":"sha512-qOe3Fj449JskxH+O2fn1GXtefrIZFkH9eaIpOwqJndtyPQurvP4ky+u7iC3n2qnqmDx+ZxaB3XMJ9Av2rraMxw==","signatures":[{"sig":"MEUCIQD2X3/Wls2F7aLAA0ig2zbyGpBDdoqMXOP7ZaAEfmlumQIgeTWyzIXyghIVLpRo4903hPfNk+zpO2wSvwH1KQOzVvA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7289436,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKlA9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrhag/+NHnvUIFR7+OiobTnoYvKb1GaxA2a5dEPkHVwxZPKioWqhJmJ\r\nuE49MIDrm9Dmz68XZi7oSAnPZA4R6ArOjZBMddKIj4MG6T+GiZrBybnEqQ3C\r\nsIVPiQ5ScISbF8EcRhdfNM49gk+l/ATdGHXOyrRCMplw/h/ia7kc5Tebj1fF\r\nH3kULi4UW2RuRBy9wcJYr45UWBqY14nq7flO+O7uaTYrTMnJR5iaf53ApyHY\r\nMHSDiNRCsJqAFGuizmOaMwIU4KdKOUYSvv/mTol05PM9WtFFmV9sLLNYxbuY\r\nRyXPXIV6n5EDqbSF8vQ6nVtfrHOrr7Xa9SNmLUx6eFLnDxZl9N7ylZzdC8JK\r\nSrP4iAZv9ZkRckqxBQZ9gtSPX760k4h6I4cAQwoVfa8h6V7m2h1J/8WpCSVu\r\nuSbfOz3JKqBJQwDTpWnS1dO/KSnxOJkBjNdTgSTQ2r89YVvRWytDNWKDF4hz\r\nPmaxl0AkndhX+kV+YWOwlkl0V2T/NWYD4RRx+HLGWeVcjFWpOIq4LSylM1mj\r\nNVeu25rnAMWrHbjFghRmyIrlXCmJIvOkXOEsWR/w0hl0DxHdmVmyNTPdV82Z\r\nN0XNXBD2toO0H1U2PjLSYoO8D5OH+lJnNB1bLlFeWWLggMaI4fTDrAb73tw9\r\nrwM+5hL1Yx0YKB347WgIMB7KKjCTj2cxCZA=\r\n=6N47\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=12.0.0"},"gitHead":"dbcf7bf3ec61edbab7b5a63f0cab7ff985378f1e","scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run test:esm","build":"npm run pre-build && npm run build:cjs && npm run build:es && rollup -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:cjs   && mocha  'lib/test/common/**/*.js' --require  isomorphic-fetch &&  mocha  'lib/test/node/**/*.js' --require  isomorphic-fetch","test:esm":"npm run build:es  && mocha  'lib/es/test/common/**/*.js' --require  esm --require  isomorphic-fetch &&  mocha  'lib/es/test/node/**/*.js' --require  esm --require  isomorphic-fetch","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"8.15.0","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"16.17.0","dependencies":{"tslib":"^2.2.0","@microsoft/kiota-abstractions":"1.0.0-preview.5","@microsoft/microsoft-graph-types":"3.0.0-RestPreview.1","@microsoft/kiota-http-fetchlibrary":"1.0.0-preview.6"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","husky":"^7.0.4","karma":"^6.3.2","mocha":"^6.2.3","sinon":"^13.0.1","eslint":"^8.9.0","rollup":"^2.36.2","ts-node":"^10.4.0","prettier":"^2.5.1","form-data":"^4.0.0","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^4.2.4","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^17.0.13","karma-mocha":"^2.0.1","lint-staged":"^12.3.1","@types/mocha":"^9.0.0","@types/sinon":"^10.0.8","@babel/runtime":"^7.12.5","@azure/identity":"^2.0.1","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@azure/msal-browser":"^2.15.0","@rollup/plugin-babel":"^5.2.2","rollup-plugin-terser":"^7.0.2","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^21.0.1","@typescript-eslint/parser":"^5.12.1","@rollup/plugin-node-resolve":"^13.1.3","@babel/plugin-transform-runtime":"^7.12.10","@typescript-eslint/eslint-plugin":"^5.12.1","eslint-plugin-simple-import-sort":"^7.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true},"@azure/msal-browser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_4.0.0-RestPreview.1_1663717437290_0.05022663799394822","host":"s3://npm-registry-packages"}},"3.0.3":{"name":"@microsoft/microsoft-graph-client","version":"3.0.3","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@3.0.3","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"142d1de756948c6987bf7b550cd214ece94892b3","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.3.tgz","fileCount":432,"integrity":"sha512-+v4b3Y0Dva71uiF85AuhXx4t3IrL0HgJNQaWxysrc/BStSHucwln1lMHCclxI6GsWs0P1BZksUE/EyY5K/TYgQ==","signatures":[{"sig":"MEYCIQDFUGg37TOrM0S8eVkc+sAFMDPUtnhoVHbL0+xWwmccCAIhAKU+lawBpsi6/s8R0Hi3pTF+X6IH8v9Uotc37EM2MlhS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1241497,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZDvkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpReBAAgNa15BLmpV+4TSk2v9VZfWNhEdtTDofiy2rsxpSwPsQO4NXq\r\nbfH1zoNjcIuYy8+P24BDty9zCHGlv/j8ZzZ6w7+oetth+1YiGFaN3On51szP\r\nSp3UiYlRO4SzEnxYV2shpS3Vaj4vGCnEf9xi2+JQARSv7L6XbIytCM1soQoX\r\njrGDuI8uhJkvINHgYBiDLhiaRgb9r9fHENTsU1y5RLhwaJ0VXI91qnABhxCY\r\nhfk10NkkcXiKO/EMAiYcEK9i1RRVr7MRsHYbZmHAlzElf//MfPHy7chcAEqW\r\n881TNfHW3rpIydinyc85eFp7L9McLZ9xoQEKrgsnvXFpN3MDoIcRPwcq8FSy\r\njd7U1kLifhbJYXUlpORW2saGJiBdJ3jAYoENSvjTfQ7qZQw5vvBcCyWBI4ib\r\nltuCbYrsqKiiO5ga0FSDoZk/voF+NEhLHwm5ewbrmR0Ebx7/vi/3mjTa+o6J\r\nP++or77WkRZBbg5++3k5QHOSmMGxDR+Wgo56K80TmX6vG0a8EGowrZOsDuAR\r\neMl3Yn9Zu/F+lGha44IdOLTBwNIFtWh9vy6jaeDrqjhK/JSMjCVw6L2Qkx3w\r\nWXvk2JvNXUKhc1THXpfgkUKWNw63nRZE4rZnzul5MVqoWqkor+ZC9eo0qKL3\r\nOsJg4OLqmOKkQd3QnAuZvj2TR630FakLtKg=\r\n=MKS+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","mocha":{"spec":["lib/test/common/**/*.js","lib/test/node/**/*.js","lib/es/test/common/**/*.js","lib/es/test/node/**/*.js"],"require":["isomorphic-fetch","esm"],"reporter":["mocha-junit-reporter"],"reporterOptions":{"mochaFile":"./testResult.xml"}},"types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=12.0.0"},"scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run test:esm","build":"npm run pre-build && npm run build:sub_cjs && npm run build:sub_es && rollup -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:sub_cjs && mocha","test:esm":"npm run build:sub_es  && mocha --require esm","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","build:sub_es":"tsc -b tsconfig-sub-es.json","build:sub_cjs":"tsc -b tsconfig-sub-cjs.json","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"8.19.2","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"16.18.0","dependencies":{"tslib":"^2.2.0","@babel/runtime":"^7.12.5"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","husky":"^8.0.0","karma":"^6.3.2","mocha":"^6.2.3","sinon":"^14.0.0","eslint":"^8.9.0","rollup":"^2.36.2","ts-node":"^10.4.0","prettier":"^2.5.1","form-data":"^4.0.0","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^4.2.4","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^18.0.0","karma-mocha":"^2.0.1","lint-staged":"^13.0.0","@types/mocha":"^9.0.0","@types/sinon":"^10.0.8","@azure/identity":"^3.0.0","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@azure/msal-browser":"^2.15.0","@rollup/plugin-babel":"^6.0.0","mocha-junit-reporter":"^2.1.1","rollup-plugin-terser":"^7.0.2","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^23.0.0","@typescript-eslint/parser":"^5.12.1","@rollup/plugin-node-resolve":"^15.0.0","@babel/plugin-transform-runtime":"^7.12.10","@microsoft/microsoft-graph-types":"^2.11.0","@typescript-eslint/eslint-plugin":"^5.12.1","eslint-plugin-simple-import-sort":"^8.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true},"@azure/msal-browser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_3.0.3_1667513316309_0.11921226730390821","host":"s3://npm-registry-packages"}},"3.0.4":{"name":"@microsoft/microsoft-graph-client","version":"3.0.4","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@3.0.4","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"6fc409336574521734379f033787af153828bf5d","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.4.tgz","fileCount":432,"integrity":"sha512-K7GIg/inDukZC2iBhFEvOSoq5ShnlIl8JSRUv8Ksw1iXTtu6kxLmBwF6xY8RZN7CTSJh+5N91aMKu5KeF0/9fA==","signatures":[{"sig":"MEYCIQCPOAn53qvUz6LH014d42b+TuHNOM7L7O431EZEAlFVawIhAJaWcN1wtJ31oLTNtxtWOYRQcjbEOQVb1kT3cTLPvvpI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1241674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbWMMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+YBAAnWyxl9XRKuR+Hfa6U7GbAk460aUbwDNIxvCnhcDJ6QCkryeH\r\nE0SITHRuDf1a6wveFiWFHlg/EeY7hipd6sLZtQ2qjTSsqCk3f9H96dHhC0qe\r\nbwOYxgFRYdmh+hu0E9dLAULL3xsmG1wYyRPqj/U6wdfb+TtaRAMo9SppQClh\r\n3rtJ1THKEDMwAN7wTVfQ/UrikCjurblutV/UimZJLbkn2P1dIVztWob9aBNM\r\nRzMh7D/GC/xdh8sh8tabFGQbxiSqkSsmtNlBK2NPRfXOud4AIljtlT3vTOlN\r\nrgdBSoX2Xt/hNgEpvE0Ge0m6zK/axSsFQyKSZzD8Ab1OCl10uMIObNU18ZOq\r\ndP6gEedue7jYieCoC2JGS+LDgC4r5M5P7nRlawg45fw251T09coge7hoycD9\r\n0a7EEpAJPeBMTa8PtguA/jCa/34ommk0U8TITMaocgaMXbH8z9YdUao6/3fe\r\nsQCWsTPbVnUJIBAqJzIvq6kP7hCsyvg9tFX6vqTbigYDHtSGPBuX9i+P8EjQ\r\n4E1I7IYeY/Ua3RFV8vV6Mr/s+q+cy9Pc0gpWJvMLDJWmfki4dBgak1p182jj\r\ncTnTnP0wxCiSxNOtTkvjcF7nVe7vUv50SNFQH4VxjyJNS6DkziO9qM+GBDvF\r\nakVrpO8turHUaD0Emit/VV+1LNDSGlul+RM=\r\n=KFqk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","mocha":{"spec":["lib/test/common/**/*.js","lib/test/node/**/*.js","lib/es/test/common/**/*.js","lib/es/test/node/**/*.js"],"require":["isomorphic-fetch","esm"],"reporter":["mocha-junit-reporter"],"reporterOptions":{"mochaFile":"./testResult.xml"}},"types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=12.0.0"},"scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run test:esm","build":"npm run pre-build && npm run build:sub_cjs && npm run build:sub_es && rollup -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:sub_cjs && mocha","test:esm":"npm run build:sub_es  && mocha --require esm","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","build:sub_es":"tsc -b tsconfig-sub-es.json","build:sub_cjs":"tsc -b tsconfig-sub-cjs.json","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"8.19.2","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"16.18.0","dependencies":{"tslib":"^2.2.0","@babel/runtime":"^7.12.5"},"_hasShrinkwrap":false,"devDependencies":{"esm":"^3.2.25","nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","husky":"^8.0.0","karma":"^6.3.2","mocha":"^6.2.3","sinon":"^14.0.0","eslint":"^8.9.0","rollup":"^2.36.2","ts-node":"^10.4.0","prettier":"^2.5.1","form-data":"^4.0.0","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^4.2.4","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^18.0.0","karma-mocha":"^2.0.1","lint-staged":"^13.0.0","@types/mocha":"^9.0.0","@types/sinon":"^10.0.8","@azure/identity":"^3.0.0","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@azure/msal-browser":"^2.15.0","@rollup/plugin-babel":"^6.0.0","mocha-junit-reporter":"^2.1.1","rollup-plugin-terser":"^7.0.2","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^23.0.0","@typescript-eslint/parser":"^5.12.1","@rollup/plugin-node-resolve":"^15.0.0","@babel/plugin-transform-runtime":"^7.12.10","@microsoft/microsoft-graph-types":"^2.11.0","@typescript-eslint/eslint-plugin":"^5.12.1","eslint-plugin-simple-import-sort":"^8.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true},"@azure/msal-browser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_3.0.4_1668113164647_0.3938815270185654","host":"s3://npm-registry-packages"}},"3.0.5":{"name":"@microsoft/microsoft-graph-client","version":"3.0.5","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@3.0.5","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"c661b5bb271fd59d34391b0657b8a78c02af9ab8","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.5.tgz","fileCount":432,"integrity":"sha512-xQADFNLUhE78RzYadFZtOmy/5wBZenSZhVK193m40MTDC5hl1aYMQO1QOJApnKga8WcvMCDCU10taRhuXTOz5w==","signatures":[{"sig":"MEQCIDTB4xGAsf4YtOSWM9xZGPiz733ehNS+hqP9mGFCtQQxAiB18ynAEOpYQKN6PMACAbwgvcwb9eJMQEE0BKkEXWwGdQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1244217,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2F97ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNhxAAl5XJ8RoGwgXsOdG9ZRHAIwdXp9wfHavAQG3/xkuwCAEfDlBR\r\n5kwas+vRYAU6cevm4gOTb/hFwsRhVq92cZFTCxJWbxIp/gYFdYjTwkOiTcJP\r\njAcCif0uxCBS12dui9LJqdQf1xNqxeMsWthTjonjatO3WzE7Fsu6yts3Rj8+\r\nl5Th4NHrhWb/ImEKaWTRi6xQJShdIgK/N1I4mzHYvqss0DDp2uloACsn1YzZ\r\nm6BOuMpyqET7nhSVzYLbiKi/Y9+k7Njwfx9VP5hz+DCOnhTtr0kJ8wFqUzC1\r\nBMrFBSFgY47ldLvxQShiqGkCMeEsGdyb1XNtDeG2SkP4WrgjSYFShz/xDoKk\r\njxj8armHkZVCkXiWBipOO1xx1X0MiP/YcKk6AeNZytgJM/s3l3PAPL7xwARf\r\nvNMqGigDpdFmIACHJLrNLPWmEH+RV9sAUy5g78sm/c+f+x7WeBJYQM9c4WvP\r\nXs+iAYv8RTaFsJ3q2ryiOBy+whwMTpSvCSx/ynATJGx+zqlmabcwhtqwL6Bk\r\n9poyIN7sQJu8YhZp+9R9fdwoh1xpaPGwsUzpf8FgEjZS+ULJmfU39sI4vgMy\r\n/eb0VmEbxNO/UoiNQ9fCADWKWvZvvqaHht5MVkgjFSW/Q5Wauw3fEmF0KgYb\r\nOkXxLcTqdYM6hV/YrOeDsoKoxbwd5G6IH9c=\r\n=DiSv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/src/index.js","mocha":{"spec":["lib/test/common/**/*.js","lib/test/node/**/*.js"],"require":["isomorphic-fetch"],"reporter":["mocha-junit-reporter"],"reporterOptions":{"mochaFile":"./testResult.xml"}},"types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=12.0.0"},"scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run karma","build":"npm run pre-build && npm run build:sub_cjs && npm run build:sub_es && rollup --bundleConfigAsCjs -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:sub_cjs && mocha","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","build:sub_es":"tsc -b tsconfig-sub-es.json","build:sub_cjs":"tsc -b tsconfig-sub-cjs.json","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"8.19.3","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"16.19.0","dependencies":{"tslib":"^2.2.0","@babel/runtime":"^7.12.5"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","husky":"^8.0.0","karma":"^6.3.2","mocha":"^10.2.0","sinon":"^15.0.0","eslint":"^8.9.0","rollup":"^3.9.1","ts-node":"^10.4.0","prettier":"^2.5.1","form-data":"^4.0.0","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^4.2.4","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^18.0.0","karma-mocha":"^2.0.1","lint-staged":"^13.0.0","@types/mocha":"^10.0.1","@types/sinon":"^10.0.8","@azure/identity":"^3.0.0","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@azure/msal-browser":"^2.15.0","@rollup/plugin-babel":"^6.0.0","mocha-junit-reporter":"^2.1.1","@rollup/plugin-terser":"^0.3.0","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^24.0.0","@typescript-eslint/parser":"^5.12.1","@rollup/plugin-node-resolve":"^15.0.0","@babel/plugin-transform-runtime":"^7.12.10","@microsoft/microsoft-graph-types":"^2.11.0","@typescript-eslint/eslint-plugin":"^5.12.1","eslint-plugin-simple-import-sort":"^8.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true},"@azure/msal-browser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_3.0.5_1675124602739_0.45642565540380864","host":"s3://npm-registry-packages"}},"3.0.6":{"name":"@microsoft/microsoft-graph-client","version":"3.0.6","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@3.0.6","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"84c93b47c64877a6e42b7f0b32930460d7e74795","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.6.tgz","fileCount":451,"integrity":"sha512-corwIFZ+yzOguEWfzhWycOBqekBzaTH0ymf060D0ONdloICcGfNVNv4LIrhbNUeB3jxsotnTY931crPDTqKM0g==","signatures":[{"sig":"MEUCIQCm5CzU7UFx1E4m4NyWtPJrcS0F04JCUxY+Os85ZFR1pAIgRKkT0OHNVVsGi8YHTVO8IQ/ZDvhdnI2e8F2ZFeMQiN0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1252551},"main":"lib/src/index.js","mocha":{"spec":["lib/test/common/**/*.js","lib/test/node/**/*.js"],"require":["isomorphic-fetch"],"reporter":["mocha-junit-reporter"],"reporterOptions":{"mochaFile":"./testResult.xml"}},"types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=12.0.0"},"scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run karma","build":"npm run pre-build && npm run build:sub_cjs && npm run build:sub_es && rollup --bundleConfigAsCjs -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:sub_cjs && mocha","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","build:sub_es":"tsc -b tsconfig-sub-es.json","build:sub_cjs":"tsc -b tsconfig-sub-cjs.json","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"9.6.7","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"18.17.1","dependencies":{"tslib":"^2.2.0","@babel/runtime":"^7.12.5"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","husky":"^8.0.0","karma":"^6.3.2","mocha":"^10.2.0","sinon":"^15.0.0","eslint":"^8.9.0","rollup":"^3.9.1","ts-node":"^10.4.0","prettier":"^3.0.0","form-data":"^4.0.0","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^5.1.6","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^20.1.4","karma-mocha":"^2.0.1","lint-staged":"^14.0.0","@types/mocha":"^10.0.1","@types/sinon":"^10.0.8","@azure/identity":"^3.0.0","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@azure/msal-browser":"^2.15.0","@rollup/plugin-babel":"^6.0.0","mocha-junit-reporter":"^2.1.1","@rollup/plugin-terser":"^0.4.0","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^25.0.0","@typescript-eslint/parser":"^5.12.1","@rollup/plugin-node-resolve":"^15.0.0","@babel/plugin-transform-runtime":"^7.12.10","@microsoft/microsoft-graph-types":"^2.11.0","@typescript-eslint/eslint-plugin":"^5.12.1","eslint-plugin-simple-import-sort":"^10.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true},"@azure/msal-browser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_3.0.6_1692908019846_0.9391925601094415","host":"s3://npm-registry-packages"}},"3.0.7":{"name":"@microsoft/microsoft-graph-client","version":"3.0.7","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"license":"MIT","_id":"@microsoft/microsoft-graph-client@3.0.7","maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"nikithauc","email":"nchettia@microsoft.com"},{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"}],"homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"nyc":{"all":true,"cache":false,"exclude":["samples/","*.js","lib/"],"include":["src/"]},"dist":{"shasum":"535507df2db40bd7ed24a670dc68c87c628177a4","tarball":"https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.7.tgz","fileCount":451,"integrity":"sha512-/AazAV/F+HK4LIywF9C+NYHcJo038zEnWkteilcxC1FM/uK/4NVGDKGrxx7nNq1ybspAroRKT4I1FHfxQzxkUw==","signatures":[{"sig":"MEYCIQDzM5Y5Zme7zFcLlr1nkqlTYlNGrQBDRFCZUw7oXR+4MgIhAI9BumTfVYkRC72blZhv0fgsi/NqL3c8kkRcdOHBKdx9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1252736},"main":"lib/src/index.js","mocha":{"spec":["lib/test/common/**/*.js","lib/test/node/**/*.js"],"require":["isomorphic-fetch"],"reporter":["mocha-junit-reporter"],"reporterOptions":{"mochaFile":"./testResult.xml"}},"types":"./lib/src/index.d.ts","module":"lib/es/src/index.js","browser":{"stream":"stream-browserify","./lib/es/src/index.js":"./lib/es/src/browser/index.js"},"engines":{"node":">=12.0.0"},"scripts":{"lint":"eslint . --ext .ts","test":"npm run test:cjs && npm run karma","build":"npm run pre-build && npm run build:sub_cjs && npm run build:sub_es && rollup --bundleConfigAsCjs -c","karma":"karma  start --single-run --browsers ChromeHeadless karma.conf.js","format":"npm run format:css && npm run format:html && npm run format:js && npm run format:json && npm run format:md && npm run format:rc && npm run format:ts","prepack":"npm install && npm run build && npm run test","build:es":"tsc --p tsconfig-es.json","lint:fix":"eslint . --ext .ts --fix","test:cjs":"npm run build:sub_cjs && mocha","build:cjs":"tsc --p tsconfig-cjs.json","format:js":"prettier --write \"**/*.js\"","format:md":"prettier --write \"**/*.md\"","format:rc":"prettier --write --parser json \"**/.*rc\"","format:ts":"prettier --write \"**/*.ts\"","pre-build":"npm run setVersion","format:css":"prettier --write \"**/*.css\"","setVersion":"gulp setVersion","format:html":"prettier --write \"**/*.html\"","format:json":"prettier --write \"**/*.json\"","build:sub_es":"tsc -b tsconfig-sub-es.json","build:sub_cjs":"tsc -b tsconfig-sub-cjs.json","test:coverage":"TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts","test:development":"tsc --p test/tsconfig-test-development.json &&  mocha  'lib/test/development/**/*.js' --require  isomorphic-fetch"},"typings":"lib/src/index","_npmUser":{"name":"microsoftgraph","email":"graphsdkpub@microsoft.com"},"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"_npmVersion":"9.6.7","description":"Microsoft Graph Client Library","directories":{},"_nodeVersion":"18.17.1","dependencies":{"tslib":"^2.2.0","@babel/runtime":"^7.12.5"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","chai":"^4.2.0","gulp":"^4.0.2","husky":"^8.0.0","karma":"^6.3.2","mocha":"^10.2.0","sinon":"^15.0.0","eslint":"^8.9.0","rollup":"^3.9.1","ts-node":"^10.4.0","prettier":"^3.0.0","form-data":"^4.0.0","uglify-es":"^3.3.9","karma-chai":"^0.1.0","typescript":"^5.1.6","@babel/core":"^7.12.10","@types/chai":"^4.2.14","@types/node":"^20.1.4","karma-mocha":"^2.0.1","lint-staged":"^14.0.0","@types/mocha":"^10.0.1","@types/sinon":"^10.0.8","@azure/identity":"^3.0.0","isomorphic-fetch":"^3.0.0","karma-typescript":"^5.2.0","@babel/preset-env":"^7.12.11","stream-browserify":"^3.0.0","source-map-support":"^0.5.19","@azure/msal-browser":"^2.15.0","@rollup/plugin-babel":"^6.0.0","mocha-junit-reporter":"^2.1.1","@rollup/plugin-terser":"^0.4.0","karma-chrome-launcher":"^3.1.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","karma-firefox-launcher":"^2.1.0","@rollup/plugin-commonjs":"^25.0.0","@typescript-eslint/parser":"^5.12.1","@rollup/plugin-node-resolve":"^15.0.0","@babel/plugin-transform-runtime":"^7.12.10","@microsoft/microsoft-graph-types":"^2.11.0","@typescript-eslint/eslint-plugin":"^5.12.1","eslint-plugin-simple-import-sort":"^10.0.0","@istanbuljs/nyc-config-typescript":"^1.0.1"},"peerDependenciesMeta":{"buffer":{"optional":true},"@azure/identity":{"optional":true},"stream-browserify":{"optional":true},"@azure/msal-browser":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/microsoft-graph-client_3.0.7_1695132930162_0.08484590959010085","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-01-13T01:55:38.469Z","modified":"2026-07-16T15:45:07.223Z","0.3.1":"2017-01-13T01:55:38.469Z","0.3.2":"2017-01-13T18:48:27.359Z","0.3.3":"2017-03-13T23:46:24.557Z","0.4.0":"2017-03-15T17:37:22.001Z","0.4.1":"2017-03-23T16:36:33.074Z","1.0.0":"2017-05-10T00:54:55.695Z","1.1.0":"2018-08-01T08:01:05.152Z","1.2.0":"2018-08-17T04:22:43.567Z","1.3.0":"2018-09-22T05:03:02.773Z","1.4.0":"2019-01-23T06:09:30.212Z","1.5.0":"2019-03-06T10:47:57.702Z","1.5.1":"2019-03-06T11:41:57.838Z","1.5.2":"2019-03-06T15:33:00.752Z","1.6.0-Preview.1":"2019-04-17T03:54:31.817Z","1.6.0-Preview.2":"2019-04-22T04:02:24.921Z","1.6.0-Preview.3":"2019-04-25T05:35:45.338Z","1.6.0":"2019-04-25T10:14:49.748Z","1.7.0-Preview.1":"2019-04-29T05:31:24.265Z","1.7.0-Preview.2":"2019-05-10T06:48:03.617Z","1.7.0-Preview.3":"2019-05-11T06:51:21.864Z","1.7.0":"2019-05-15T03:54:12.507Z","2.0.0-Preview.1":"2019-06-19T09:35:39.445Z","2.0.0-Preview.2":"2019-06-25T05:16:08.188Z","2.0.0-Preview.3":"2019-07-01T09:53:31.502Z","2.0.0-Preview.4":"2019-07-11T09:38:50.871Z","2.0.0-Preview.5":"2019-08-14T09:52:30.649Z","2.0.0":"2019-08-27T05:47:58.284Z","2.1.0-Preview.1":"2019-10-26T06:41:20.421Z","2.1.0-Preview.2":"2020-10-06T19:19:14.434Z","2.1.0":"2020-10-09T17:37:53.762Z","2.1.1":"2020-10-30T20:10:15.133Z","2.2.0-Preview.1":"2020-11-19T00:43:35.595Z","2.2.0":"2020-11-30T20:28:56.433Z","2.2.1":"2020-12-01T21:37:05.706Z","3.0.0-Preview.1":"2021-04-26T18:47:56.297Z","3.0.0-Preview.2":"2021-06-08T22:29:56.061Z","3.0.0-Preview.3":"2021-07-28T21:23:19.716Z","3.0.0":"2021-08-09T21:48:46.617Z","3.0.1":"2021-11-15T22:54:07.847Z","3.0.2":"2022-02-09T22:52:07.401Z","4.0.0-Preview.1":"2022-03-24T19:15:22.504Z","1.7.1-spfx":"2022-06-22T19:25:55.480Z","1.7.2-spfx":"2022-06-28T22:42:43.916Z","4.0.0-RestPreview.1":"2022-09-20T23:43:57.587Z","3.0.3":"2022-11-03T22:08:36.548Z","3.0.4":"2022-11-10T20:46:04.903Z","3.0.5":"2023-01-31T00:23:22.975Z","3.0.6":"2023-08-24T20:13:40.209Z","3.0.7":"2023-09-19T14:15:30.553Z"},"bugs":{"url":"https://github.com/microsoftgraph/msgraph-sdk-javascript/issues"},"license":"MIT","homepage":"https://github.com/microsoftgraph/msgraph-sdk-javascript#readme","keywords":["Microsoft","Graph","SDK","JavaScript","Client"],"repository":{"url":"git+https://github.com/microsoftgraph/msgraph-sdk-javascript.git","type":"git"},"description":"Microsoft Graph Client Library","maintainers":[{"email":"npmjs@microsoft.com","name":"microsoft1es"},{"email":"microsoft-oss-publishing@microsoft.com","name":"microsoft-oss-releases"},{"email":"nchettia@microsoft.com","name":"nikithauc"},{"email":"graphsdkpub@microsoft.com","name":"microsoftgraph"}],"readme":"# Microsoft Graph JavaScript Client Library\n\n[![npm version badge](https://img.shields.io/npm/v/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client) [![Known Vulnerabilities](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript/badge.svg?maxAge=86400)](https://snyk.io/test/github/microsoftgraph/msgraph-sdk-javascript) [![Licence](https://img.shields.io/github/license/microsoftgraph/msgraph-sdk-javascript.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/microsoftgraph/msgraph-sdk-javascript) [![Downloads](https://img.shields.io/npm/dm/@microsoft/microsoft-graph-client.svg?maxAge=86400)](https://www.npmjs.com/package/@microsoft/microsoft-graph-client)\n\nThe Microsoft Graph JavaScript client library is a lightweight wrapper around the Microsoft Graph API that can be used server-side and in the browser.\n\n-   [Microsoft Graph JavaScript Client Library](#microsoft-graph-javascript-client-library)\n    -   [Installation](#installation)\n        -   [Via npm](#via-npm)\n        -   [Via Script Tag](#via-script-tag)\n    -   [Getting started](#getting-started)\n        -   [1. Register your application](#1-register-your-application)\n        -   [2. Create a Client Instance](#2-create-a-client-instance)\n        -   [3. Make requests to the graph](#3-make-requests-to-the-graph)\n    -   Documentation\n        -   [HTTP Actions](docs/Actions.md)\n        -   [Chained APIs to call Microsoft Graph](docs/CallingPattern.md)\n        -   [OData system query options - Query Parameters](docs/QueryParameters.md)\n        -   [Batch multiple requests into single HTTP request](docs/content/Batching.md)\n        -   [Cancel a HTTP request](docs/CancellingAHTTPRequest.md)\n        -   [Configurations to your request](docs/OtherAPIs.md)\n            -   [Query](docs/OtherAPIs.md#QUERY)\n            -   [Version](docs/OtherAPIs.md#VERSION)\n            -   [Headers](docs/OtherAPIs.md#HEADER-AND-HEADERS)\n            -   [Options](docs/OtherAPIs.md#OPTION-AND-OPTIONS)\n            -   [MiddlewareOptions](docs/OtherAPIs.md#MIDDLEWAREOPTIONS)\n            -   [ResponseType](docs/OtherAPIs.md#RESPONSETYPE)\n        -   [Upload large files to OneDrive, Outlook, Print API](docs/tasks/LargeFileUploadTask.md)\n        -   [Page Iteration](docs/tasks/PageIterator.md)\n        -   [Getting Raw Response](docs/GettingRawResponse.md)\n        -   [Creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)\n    -   [Samples and tutorials](#samples-and-tutorials)\n        -   Step-by-step training exercises on creating a basic application using the Microsoft Graph JavaScript SDK:\n            -   [Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)\n            -   [Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)\n            -   [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)\n            -   [Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)\n            -   [Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)\n            -   [Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)\n        -   Samples using `TokenCredentialAuthenticationProvider` with the `@azure/identity` library:\n            -   [TokenCredentialAuthenticationProvider Samples](samples/)\n        -   Samples using `LargeFileUploadTask` and `OneDriveLargeFileTask`:\n            -   [LargeFileUploadTask Samples](samples/)\n        -   Samples to learn more about authentication using `MSAL`libraries:\n            -   [Azure-Sample Vanilla JS SPA using MSAL Browser and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph)\n            -   [ Azure-Sample Angular SPA using MSAL Angular and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph)\n            -   [ Azure-Sample React SPA using MSAL React and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph)\n    -   [Questions and comments](#questions-and-comments)\n    -   [Contributing](#contributing)\n    -   [Additional resources](#additional-resources)\n    -   [Third Party Notices](#third-party-notices)\n    -   [Security Reporting](#security-reporting)\n    -   [License](#license)\n    -   [We Value and Adhere to the Microsoft Open Source Code of Conduct](#we-value-and-adhere-to-the-microsoft-open-source-code-of-conduct)\n\n**Looking for IntelliSense on models (Users, Groups, etc.)? Check out the Microsoft Graph Types [v1.0](https://github.com/microsoftgraph/msgraph-typescript-typings) and [beta](https://github.com/microsoftgraph/msgraph-beta-typescript-typings)!!**\n\n[![TypeScript demo](https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-javascript/master/types-demo.PNG)](https://github.com/microsoftgraph/msgraph-typescript-typings)\n\n## Node version requirement\n\nNode.js 12 LTS or higher. The active Long Term Service (LTS) version of Node.js is used for on-going testing of existing and upcoming product features.\n\nFor Node.js 18 users, it is recommended to disable the experimental `fetch` feature  by supplying the `--no-experimental-fetch` command-line flag while using the Microsoft Graph JavaScript client library.\n\n## Installation\n\n### Via npm\n\n```cmd\nnpm install @microsoft/microsoft-graph-client\n```\n\nimport `@microsoft/microsoft-graph-client` into your module.\n\nAlso, you will need to import any fetch polyfill which suits your requirements. Following are some fetch polyfills -\n\n-   [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch).\n-   [cross-fetch](https://www.npmjs.com/package/cross-fetch)\n-   [whatwg-fetch](https://www.npmjs.com/package/whatwg-fetch)\n\n```typescript\nimport \"isomorphic-fetch\"; // or import the fetch polyfill you installed\nimport { Client } from \"@microsoft/microsoft-graph-client\";\n```\n\n### Via Script Tag\n\nInclude [graph-js-sdk.js](https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js) in your HTML page.\n\n```HTML\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js\"></script>\n```\n\nIn case your browser doesn't have support for [Fetch](https://developer.mozilla.org/docs/Web/API/Fetch_API) [[support](https://developer.mozilla.org/docs/Web/API/Fetch_API#Browser_compatibility)] or [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise) [[support](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#Browser_compatibility)], you need to use polyfills like [github/fetch](https://github.com/github/fetch) for fetch and [es6-promise](https://github.com/stefanpenner/es6-promise) for promise.\n\n```HTML\n<!-- polyfilling promise -->\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js\"></script>\n\n<!-- polyfilling fetch -->\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/whatwg-fetch/dist/fetch.umd.min.js\"></script>\n\n<!-- depending on your browser you might wanna include babel polyfill -->\n<script type=\"text/javascript\" src=\"https://cdn.jsdelivr.net/npm/@babel/polyfill@7.4.4/dist/polyfill.min.js\"></script>\n```\n\n## Getting started\n\n### 1. Register your application\n\nTo call Microsoft Graph, your app must acquire an access token from the Microsoft identity platform. Learn more about this -\n\n-   [Authentication and authorization basics for Microsoft Graph](https://docs.microsoft.com/graph/auth/auth-concepts)\n-   [Register your app with the Microsoft identity platform](https://docs.microsoft.com/graph/auth-register-app-v2)\n\n### 2. Create a Client Instance\n\nThe Microsoft Graph client is designed to make it simple to make calls to Microsoft Graph. You can use a single client instance for the lifetime of the application.\n\nFor information on how to create a client instance, see [Creating Client Instance](./docs/CreatingClientInstance.md)\n\n### 3. Make requests to the graph\n\nOnce you have authentication setup and an instance of Client, you can begin to make calls to the service. All requests should start with `client.api(path)` and end with an [action](./docs/Actions.md).\n\nExample of getting user details:\n\n```typescript\ntry {\n\tlet userDetails = await client.api(\"/me\").get();\n\tconsole.log(userDetails);\n} catch (error) {\n\tthrow error;\n}\n```\n\nExample of sending an email to the recipients:\n\n```typescript\n// Construct email object\nconst mail = {\n\tsubject: \"Microsoft Graph JavaScript Sample\",\n\ttoRecipients: [\n\t\t{\n\t\t\temailAddress: {\n\t\t\t\taddress: \"example@example.com\",\n\t\t\t},\n\t\t},\n\t],\n\tbody: {\n\t\tcontent: \"<h1>MicrosoftGraph JavaScript Sample</h1>Check out https://github.com/microsoftgraph/msgraph-sdk-javascript\",\n\t\tcontentType: \"html\",\n\t},\n};\ntry {\n\tlet response = await client.api(\"/me/sendMail\").post({ message: mail });\n\tconsole.log(response);\n} catch (error) {\n\tthrow error;\n}\n```\n\nFor more information, refer: [Calling Pattern](docs/CallingPattern.md), [Actions](docs/Actions.md), [Query Params](docs/QueryParameters.md), [API Methods](docs/OtherAPIs.md) and [more](docs/).\n\n## Samples and tutorials\n\nStep-by-step training exercises that guide you through creating a basic application that accesses data via the Microsoft Graph:\n\n-   [Build Angular single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/angular)\n-   [Build Node.js Express apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/node)\n-   [Build React Native apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react-native)\n-   [Build React single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/react)\n-   [Build JavaScript single-page apps with Microsoft Graph](https://docs.microsoft.com/graph/tutorials/javascript)\n-   [Explore Microsoft Graph scenarios for JavaScript development](https://docs.microsoft.com/learn/paths/m365-msgraph-scenarios/)\n\nThe Microsoft Graph JavaScript SDK provides a `TokenCredentialAuthenticationProvider` to authenticate using the `@azure/identity` auth library. Learn more:\n\n-   [Documentation for creating an instance of TokenCredentialAuthenticationProvider](docs/TokenCredentialAuthenticationProvider.md)\n-   [TokenCredentialAuthenticationProvider Samples](samples/)\n\nThe Microsoft Graph JavaScript SDK provides a `LargeFileUploadTask` to upload large files to OneDrive, Outlook and Print API:\n\n-   [LargeFileUploadTask documentation](docs/tasks/LargeFileUploadTask.md)\n-   [Samples using `LargeFileUploadTask` and `OneDriveLargeFileTask`](samples/) The following `MSAL` samples provide information on authentication using `MSAL` libraries and how to use the Microsoft Graph JavaScript SDK client with MSAL as a custom authentication provider to query the Graph API:\n\n-   [Azure-Sample Vanilla JS SPA using MSAL Browser and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-tutorial/tree/main/2-Authorization-I/1-call-graph)\n-   [Azure-Sample Angular SPA using MSAL Angular and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-angular-tutorial/tree/main/2-Authorization-I/1-call-graph)\n-   [Azure-Sample React SPA using MSAL React and Microsoft Graph JavaScript SDK](https://github.com/Azure-Samples/ms-identity-javascript-react-tutorial/tree/main/2-Authorization-I/1-call-graph)\n\n## Questions and comments\n\nWe'd love to get your feedback about the Microsoft Graph JavaScript client library. You can send your questions and suggestions to us in the [Issues](https://github.com/microsoftgraph/msgraph-sdk-javascript/issues) section of this repository.\n\n## Contributing\n\nPlease see the [contributing guidelines](CONTRIBUTING.md).\n\n## Additional resources\n\n-   [Microsoft Graph website](https://graph.microsoft.io)\n-   The Microsoft Graph TypeScript definitions enable editors to provide intellisense on Microsoft Graph objects including users, messages, and groups.\n    -   [@microsoft/microsoft-graph-types](https://www.npmjs.com/package/@microsoft/microsoft-graph-types) or [@types/microsoft-graph](https://www.npmjs.com/package/@types/microsoft-graph)\n    -   [@microsoft/microsoft-graph-types-beta](https://www.npmjs.com/package/@microsoft/microsoft-graph-types-beta)\n-   [Microsoft Graph Toolkit: UI Components and Authentication Providers for Microsoft Graph](https://docs.microsoft.com/graph/toolkit/overview)\n-   [Office Dev Center](http://dev.office.com/)\n\n## Tips and Tricks\n\n- [Microsoft Graph SDK `n.call is not a function` by Lee Ford](https://www.lee-ford.co.uk/posts/graph-sdk-is-not-a-function/)\n- [Example of using the Graph JS library with ESM and `importmaps` ](https://github.com/waldekmastykarz/js-graph-101/blob/main/index_esm.html)\n\n## Third Party Notices\n\nSee [Third Party Notices](./THIRD%20PARTY%20NOTICES) for information on the packages that are included in the [package.json](./package.json)\n\n## Security Reporting\n\nIf you find a security issue with our libraries or services please report it to [secure@microsoft.com](mailto:secure@microsoft.com) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](http://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting [this page](https://technet.microsoft.com/security/dd252948) and subscribing to Security Advisory Alerts.\n\n## License\n\nCopyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License (the \"[License](./LICENSE)\");\n\n## We Value and Adhere to the Microsoft Open Source Code of Conduct\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","readmeFilename":"README.md"}