Okay, I was able to read contacts like so:
-
Create new OAuth2 API credentials in n8n, this will show a redirect URL required for the next step:
-
Register a new application in the Azure portal under “App registrations”, specifying the redirect URL from step 1:
-
Copy the client ID from the Azure portal and add it to the n8n credentials:
- Copy the authorization and token URLs from the endpoint section in the Azure portal and add them to the n8n credentials:
- Create a client secret and add it to n8n (make sure to copy the secret value and not the ID):
- In the final step, add scopes such as
offline_access openid email profile OrgContact.Read.All Contacts.ReadWrite
Now you’re ready to connect n8n with MS365. Confirm the permissions when asked:
You should be able to run the workflow from your last thread around this. You can also append another node to fetch an individual contact using the endpoint you have shared above:
This works as it should:
If this still fails for you with the initial error message your best bet would be to reach out to Microsoft’s support team directly to find out which permissions might be missing, leading to this error.