To setup Named Credential in Salesforce for Microsoft, get the Client Id, Client Secret and Tenant Id from the Azure Portal.
![](https://www.infallibletechie.com/wp-content/uploads/2022/03/how-to-setup-named-credential-in-876584909.png)
Note:
Tenant Id should be used in the Auth. Provider Authorize Endpoint URL and Token Endpoint URL.
1. Create Auth. Provider.
![](https://www.infallibletechie.com/wp-content/uploads/2022/03/Auth20Provider20for2020Microsoft20in20Salesforce.png)
2. Create the Named Credential with the Auth. Provider from the step 1.
![](https://www.infallibletechie.com/wp-content/uploads/2022/03/Named20Credential20Microsoft20in20Salesforce.png)