authMessage = "grant_type=client_credentials&client_id=" + msAppId + "&client_secret=" + urllib.parse.quote(msAppPass, safe="") + "&scope=https%3A%2F%2Fapi.botframework.com%2F.default"
Error : authReply {'error': 'unauthorized_client', 'error_description': "AADSTS700016: Application with identifier '{id}' was not found in the directory 'Bot Framework'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.\r\nTrace ID: {trace-id}\r\nCorrelation ID: {cor-id}\r\nTimestamp: 2023-06-21 08:21:04Z", 'error_codes': [700016], 'timestamp': '2023-06-21 08:21:04Z', 'trace_id': {trace-id}, 'correlation_id': {cor-id}', 'error_uri': 'https://login.microsoftonline.com/error?code=700016'}
And When trying to generate token using Tenant ID getting 401 status while doing POST request
Hello team, I am trying to post message in teams using below code but getting few errors. I am new to this so seeking your help to address the issue.
When I used below line getting error
authMessage = "grant_type=client_credentials&client_id=" + msAppId + "&client_secret=" + urllib.parse.quote(msAppPass, safe="") + "&scope=https%3A%2F%2Fapi.botframework.com%2F.default" Error : authReply {'error': 'unauthorized_client', 'error_description': "AADSTS700016: Application with identifier '{id}' was not found in the directory 'Bot Framework'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.\r\nTrace ID: {trace-id}\r\nCorrelation ID: {cor-id}\r\nTimestamp: 2023-06-21 08:21:04Z", 'error_codes': [700016], 'timestamp': '2023-06-21 08:21:04Z', 'trace_id': {trace-id}, 'correlation_id': {cor-id}', 'error_uri': 'https://login.microsoftonline.com/error?code=700016'}
And When trying to generate token using Tenant ID getting 401 status while doing POST request
authUrl = "https://login.microsoftonline.com/{tenant-id}/oauth2/v2.0/token"
########Error while POST request (401)###### logger.debug('postResponseToTeams: sending Lex response to MS Bot Framework') hed = {"Authorization" : "Bearer " + authReply["access_token"], "Content-Type": "application/json"} print("returnUrl",returnUrl)
returnUrl https://smba.trafficmanager.net/amer/v3/conversations/
Could you please have a look into issue and suggest