AppException: could not find PEM formatted data in the provided public key

I encountered an issue while using the MongoDB Realm SDK in my Flutter application for authentication using JWT tokens. When attempting to authenticate using
credentials.jwt(token),

The token is generate from MSAL (Microsoft)
I consistently receive the following error message: “AppException: could not find PEM formatted data in the provided public key”.

Any assistance or guidance on resolving this issue would be greatly appreciated. Thank you!