benbaran / adal-angular6-example

Angular 6 ADAL Authentication Example
20 stars 13 forks source link

Added call to Microsoft Graph API to show secured call #2

Closed geerzo closed 6 years ago

geerzo commented 6 years ago

This is to demonstrate calling an API to exercise the library more fully.

FerencPeli commented 6 years ago

@geerzo Could you please show us how did you configure the 'endpoints' in your environment.local.ts? I believe that is what I'm missing to successfully call the Graph API.

geerzo commented 6 years ago
endpoints: {
            'https://graph.microsoft.com': '00000003-0000-0000-c000-000000000000'
          }

BTW - the way I found the right App ID is to make a call to the API just using a browser or other tool and then looking at the error. It will tell you how it expects the App ID to map.