Hi @Riley Bolen
Thank you for post!
For your query, I understand that you are getting error AADSTS50013: Assertion failed signature validation. [Reason - The key was not found when you are using the On-Behalf-Of flow.
Could you please confirm have you set the Application ID URI of API B as api://{client_id}
in Azure Active Directory portal, if not you can set by navigating to App registration and choose your application -> Expose an API and add the Application ID URI which as shown in the below.
And now add the scope for API B such as access_as_user
and now grant the permission for API to use the scope. To do navigate to API permissions -> Click Add Permission -> Search with your application ID -> In the Delegated permissions section, ensure that the right permissions are checked which are shown in the below.
When you request a token from API A you can specify the scope as api://{client_id}/access_as_user
and the token will have the correct audience claim for API B.
You can also refer to this post where similar issue has been discussed:
I hope this information helps! please Feel free to ask any questions you may have.
Thanks,
Akhilesh.
Let us know if this answer was helpful to you or if you need additional assistance. If it was helpful, please remember to accept it so that others in the community with similar questions can more easily find a solution.