I'm trying to acquire a token to call microsoft graph using angular to retrieve signed in user's profile picture. I am using the '@azure/msal-angular' library for authentication through azure AD. I have the API permissions setup for Microsoft Graph - User.Read in my application, however, I keep getting an error that my application needs access that only an admin can grant. My assumption is that I need to create a client secret but I'm not sure where to configure that in my code.
export const protectedResourceMap: [string, string[]][] =
[
['https://graph.microsoft.com', ['User.Read']]
];
export const IdentityConfig: MsalConfig = {
clientID: <clientid>,
validateAuthority: true,
protectedResourceMap: protectedResourceMap,
consentScopes: ['User.Read'],
};
...
imports: [
...
MsalModule.forRoot(IdentityConfig)
]