First Register your app in Microsoft Azure AD. For reference: https://developer.microsoft.com/en-us/graph/docs/concepts/auth_register_app_v2
You can make use of sample queries to Graph API using this url: https://developer.microsoft.com/en-us/graph/graph-explorer
This project was generated with Angular CLI version 11.2.11.
- Clone or Download the code to your folder.
- Open
configs.ts
file under location:\ANGULAR6-GRAPH-API-CONNECT\src\app\shared
. - Update your
appId
(example: in place of 'YOUR-CLIENTID-OF-REGISTERED-APP' to 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) and then save the file. - Open Command Prompt (Windows + R => type 'cmd' => Enter) and change directory to the downloaded location, say, c:\yourpath\ANGULAR6-GRAPH-API-CONNECT.
- Type command:
npm install
and then pressEnter
; node_modules gets downloaded. - Type command:
ng serve -o
and then pressEnter
to run the project. - Browser will open and click on
Connect
button. A popup gets open for authentication. - Login to your personal account.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.