@JOCO-1665, Thank you for reaching out. The redirect uri is something that AAD needs to know so that once AAD has done preparing the requested token, it would post that token back on that redirect uri so that the application can consume it.
For your application since not sure about the complete request that you are sending, let me share a sample request with which you can test.
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id={client-id}&response_type=code&redirect_uri={redirect-uri}&response_mode=fragment&scope=openid%20offline_access%20https%3A%2F%2Fgraph.microsoft.com%2F.default&state=12345
This request uses the following scopes openid, offline_access and https://graph.microsoft.com/.default. You can modify the scope as per your need and then try this request out. When you specify the redirect uri in this request, make sure that same redirect uri is listed in the app registration too. If this request gets successfully submitted to AAD, you should receive a response in the following format:
https://{redirect-uri}#code=xxxxxxx
If this fails, do let us know the exact request that you are sending to AAD to fetch the code or the token so based on that we can help you further.
Hope this helps.
Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.