0

I want to get the microsoft user token using the msal-node nodejs module. I don't know why i receive this error so if someone have a little idea ;-;: Error code

I tried to retrieve the user microsoft token by using the acquireTokenByDeviceCode msal's function. code sample

The PublicClientApplication object contain clientId (from the azureAD panel) and authority (https://login.microsoftonline.com/consumers) informations.

Thanks in advance ^^

ItsBursty
  • 1
  • 4

1 Answers1

0

When you try to request a new access token, use this scope [https://graph.microsoft.com/.default](https://graph.microsoft.com/.default)

All Client Credentials requests on the v2 endpoint must include scope={resource}/.default where {resource} is the API which the app intends to call.

References: c# - AADSTS70011: The provided value for the input parameter 'scope' is not valid - Stack Overflow, Application permission 'scopes' · Issue #36432 · MicrosoftDocs/azure-docs · GitHub and Cannot get access token for scope https://graph.microsoft.com/User.ReadWrite.All · Issue #449 · AzureAD/microsoft-authentication-library-for-dotnet · GitHub

Madhuraj Vadde
  • 1,099
  • 1
  • 5
  • 13