AADSTS500113: No reply address is registered for the application. | How to resolve this ?

Aman Prakash Singh 0 Reputation points
2024-07-18T13:30:03.08+00:00

Hi there I am using replit to write a telegram bot that updates the user input to a excel file. I connected ms graph api to my code. It didn't worked I mean worked but the excel file wasn't updated. So I tried getting the access token which was a success and then implemented that code the error wasn't resolved so I tried connecting it through the manual authorization process the login screen to permit the access token it showed another eror then I came over this..

No matter what I am trying whateber I am adding in the azure portal the link remains the same. My get access token function

import logging
import msal
from hi import CLIENT_ID, TENANT_ID
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger("main")
SCOPES = ["https://graph.microsoft.com/.default"]
def get_access_token():
    authority = f"https://login.microsoftonline.com/{TENANT_ID}"
    app = msal.PublicClientApplication(CLIENT_ID, authority=authority)
    try:
        result = app.acquire_token_interactive(scopes=SCOPES)
        access_token = result.get('access_token')
        if access_token:
            return access_token
        else:
            error_msg = result.get('error_description', result.get('error', 'Unknown error'))
            logger.error(f"Failed to retrieve access token: {error_msg}")
            raise Exception(f"Could not retrieve access token: {error_msg}")
    except Exception as e:
        logger.error(f"Exception while retrieving access token: {str(e)}")
        raise
# Example usage:
try:
    token = get_access_token()
    print("Access token:", token)
except Exception as e:
    print("Error:", str(e))

ggyfd

My Images of at the azure portal are

png-ms-graph-ss

ssjhhu

ssgfhgjh

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,939 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,364 questions
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,682 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2024-07-18T13:30:03.13+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error message "AADSTS500113: No reply address is registered for the application" indicates that there is no reply URL registered for the application. This error can occur if the reply URL is not configured correctly in the Azure portal. You can try verifying that the reply URL in the Azure portal is correct and matches the reply URL set on the registered app in Microsoft Entra ID.

    Additionally, you can consult the README.md file included with the quick start project for instructions about how to create an app registration and configure it in the sample code.


    References:

    0 comments No comments