Flow to create a folder using Microsoft OneDrive Spoke completes successfully but fails to create

mkm1
Mega Guru

I have a flow to create a folder in MicroSoft One drive. The follow completes successfully but fails to create a folder. While trying to analyze the output data of the flow execution details which shows an error message "

 

Invalid username or password/token", I analyzed the credentials and connections for permissions. All permissions seem to be working. Any guidance will help, I have attached following screenshots of following:
Flow screenshot
Flow execution details
Permission for Microsoft OneDrive Spoke Credential
Permission for Microsoft OneDrive Spoke Connection
Permission for OneDrive Oauth
 
6 REPLIES 6

Thank you, Amit, for sharing the knowledge base. I will follow the instructions in KB, will update you it resolves the issue.

mkm1
Mega Guru

I followed the instructions to generate the OAuth token, as shown in the attached OAuth 2.0 Credential screenshot. I made progress by modifying the Application Registry to include the tenant ID in both the Authorization URL and Token URL (see the attached Application Registry screenshot). It seems to be generating the token, as I am prompted to log into the Azure portal, successfully log in, and then redirected to the specified URL in the application registry with the generated authorization code. However, the redirect to ServiceNow results in an 'HTTP Error 401 - Unauthorized' (refer to the attached Redirect URL Failure screenshot).

I have the following questions:

  1. Does adding the tenant ID to the Authorization URL and Token URL pose a security risk?
  2. Why is the redirect URL failing, and what authorization is necessary on ServiceNow?