O365 connector not able to connect, test fails with logged "Error fetching Graph API Token"
Configuring O365 connector on SIM and testing but Test connection failing and SIM logs show below error:
2023-07-10 11:36:18,720 [1] ERROR SnowSoftware.ExternalDataProvider.Providers.Office365.Properties - Test connection from the GUI failed. Exception:
System.Security.Authentication.AuthenticationException: Error fetching Graph API token. Error: Status code 401 Unauthorized does not indicate success., status code: Unauthorized
at SnowSoftware.ExternalDataProvider.Providers.Office365.Clients.Graph.Authentication.AuthenticationClient.<GetToken>d__3.MoveNext()
SIM 5.52
- Confirmed the user permissions used to create the application ID.
- Admin consent had been granted as per pre-requisites.
- Ran the powershell command to check the User persmissions from SIM server. Contact support for assistance with this.
- The powershell command shows the error that Secret value is not correct.
On O365 portal Under API permission when creating the application secret, it shows the Secret Value and Secret ID. Secret Value is used in the O365 connector, and is only visible when creating the application. If you do not have it recorded elsewhere, you will need to create an application and copy the value while it is still visible.
Copy the Secret Value, which is used as the Application Secret for the Office 365 connector:
The failure to connect and test failure resulted from using the Secret ID rather than the Secret Value as the Application Secret in the O365 connector.