1

I have read this Where to Store Token Auth? and as far as I understand this, the best way for an OAuth based auth. is to use the named credentials. But I do not get the point how this work. In my case I have to make the request against the Microsoft Graph API. So I have the following parameters.

  1. client_id -> fix(xxxx)
  2. scope -> fix (https://graph.microsoft.com/.default)
  3. client_secret -> fix(xxx)
  4. grant_type -> fix (client_credentials)

and of course an Endpoint. After this I receive an about 1500 chars long access token and with this token I can make REST callouts. If I do this manually(or via APEX and fix coded values) everything works fine. But I would like to store the 3 values (1,3) as well as the access token somewhere securely.

So is it possible to make this with the mentioned named credentials? Where do these 4/5 values are stored? From the description SF would handle this stuff but how should this work?

Since the access token is so long its not possible for me to use custom settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.