❓Redirect URI Mismatch — AADSTS50011 — Trouble with Power BI Embed Flow

Mala Sun 20 Reputation points
2025-06-28T16:18:25.2333333+00:00

Hello Microsoft Community,

I'm building a Power BI embedded web application using the interactive login flow with MSAL (Python), but I keep getting the error AADSTS50011 regarding the Redirect URI mismatch.


🔧 My Setup:

  • App name: stonerosetreasury-embed-app

Platform: Python Flask (localhost)

Login Flow: Interactive browser login via MSAL

Redirect URI used in code: http://localhost:5000/getAToken

Redirect URI configured in Azure: I tried:

http://localhost

  `http://localhost:5000`

  
     `http://localhost:5000/getAToken` (now added) ✅
```---
🧾 Error Code:


```yaml
rust
Copy
AADSTS50011: The redirect URI 'http://localhost:5000/getAToken' specified in the request does not match the redirect URIs configured for the application '9c3f11fd-7fce-431e-b2ba-1e915496c3bc'.

📷 Screenshot of authentication settings:

(Attached below — includes platform configuration and URIs)


✅ What works:

Using Service Principal Flow with generate_embed_token.py successfully acquires a token and embed URL.

But I want to support interactive user login (e.g. for accessing user-bound reports).


❓Question:

What else do I need to configure in Azure to make http://localhost:5000/getAToken accepted as a valid redirect URI for my app?

Any advice or checklist I can follow?Hello Microsoft Community,

I'm building a Power BI embedded web application using the interactive login flow with MSAL (Python), but I keep getting the error AADSTS50011 regarding the Redirect URI mismatch.


🔧 My Setup:

App name: stonerosetreasury-embed-app

Platform: Python Flask (localhost)

Login Flow: Interactive browser login via MSAL

Redirect URI used in code:
http://localhost:5000/getAToken

Redirect URI configured in Azure:
I tried:

http://localhost

  `http://localhost:5000`

  
     `http://localhost:5000/getAToken` (now added) ✅
```---
🧾 Error Code:


```yaml
rust
Copy
AADSTS50011: The redirect URI 

📷 Screenshot of authentication settings:

(Attached below — includes platform configuration and URIs)


✅ What works:

Using Service Principal Flow with generate_embed_token.py successfully acquires a token and embed URL.

But I want to support interactive user login (e.g. for accessing user-bound reports).


❓Question:

What else do I need to configure in Azure to make http://localhost:5000/getAToken accepted as a valid redirect URI for my app?

Any advice or checklist I can follow?

Thanks so much for your help! Mala Sun <Mod remove external URL>

Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
277 questions
0 comments No comments
{count} votes

Accepted answer
  1. simo-k 11,145 Reputation points Volunteer Moderator
    2025-06-28T16:28:16.51+00:00

    Microsoft Q&A(en-us) does not support Fabric.
    Please ask your question in the community below.
    Fabric Community
     ├ Power BI
     ├ Data Engineering
     ├ Data Warehouse
     ├ Data Science
     ├ Data Factory
     ├ Real-Time Intelligence
     ├ Databases
     └ Fabric platform

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.