@devarae , The error 401 is Unauthorized. This error is prompted by the API, when a request is sent but the request doesnt contain proper permissions for the API to validate and authorize the access.
In you case, the API that is exposed through AAD, should have some permissions listed on it. Now when you are requesting for a token from AAD, these permissions should be asked for from AAD and AAD would issue an access token with these permissions listed in it, either under the scp parameter or roles parameter [this depends on the fact if you are using delegated permissions(user permissions) or application permissions]
Once you have the permissions listed in your token and then you send the token as bearer to the api, the api would be able to provide you the access after validating and authorizing the permissions from the access token.
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.