[BUG] MongoDB Connector 401 when trying Azure Function data API

Open
#3,997 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
azure, mongodb
Domain
api, backend, cloud

Research direction

Start with the MongoDB connector's documented Azure Function setup in certified-connectors/MongoDB, especially the Option 2 zipdeploy instructions. Compare a successful Azure portal, Postman, or Flow HTTP request with the connector's request and authentication behavior. Done means the connector executes the Azure Function successfully during a Flow run, or the missing request detail is identified.

Written by the indexing model from the issue text.

Description

bug
Type of Connector

Certified Connector

Name of Connector

MongoDB

Describe the bug

In preparation for Mongo deprecating their Data API I've followed the suggested approach of deploying an Azure Function to replicate the API features and maintain access to Mongo data from a PowerAutomate Flow.

As explained here: https://github.com/microsoft/PowerPlatformConnectors/tree/dev/certified-connectors/MongoDB#option-2-set-up-azure-function-using-zipdeploy

The Azure Function was setup successfully and testing it from Azure portal and Postman works great. Even testing it from a Flow HTTP action works fine. However the Mongo connector fails from a Flow.

I've tried every app key option (master and default from both host and function levels). No matter which I get a 401 Unauthorized.

Is there some way to debug further and see the underlying request the Mongo connector is making? Is it just not formatting the request properly to the Azure Function?

Is this a security bug?

No, this is not a security bug

What is the severity of this bug?

Severity 1 - Connector is broken or there's a very serious issue

To Reproduce

Follow instructions here: https://github.com/microsoft/PowerPlatformConnectors/tree/dev/certified-connectors/MongoDB#option-2-set-up-azure-function-using-zipdeploy

Expected behavior

The Mongo connector properly executes during Flow run.

Environment summary

Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build)
CLI version (paconn --version)
OS version
Shell Type (e.g. bash, cmd.exe, Bash on Windows)

Additional context
Image
Dominant language
C#
Stars
1.3k
Forks
1.5k
Avg merge
5d 15h
Merged PRs (30d)
11

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/PowerPlatformConnectors

All issues in microsoft/PowerPlatformConnectors

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.