if I understand, you have a webapi, and a spa application (if spa hosted by seperate website, the webapi need to enable CORS)
typically you would use JWT tokens for the SPA to authenticate with the server. msal will use oauth to get the token, but azure ad (like many oauth providers) does not support authenication via an iframe.
to call the graphapi using SPA token, the app must be register with azure ad and configured to have graphapi access. typically the user will need to authorize the access during login (must admin my prevent this).
so the site hosting the spa, is the app registered site. when authentication is required, the spa redirects to azure login. after login azure redirects back to the hosting site, the hosting reloads the spa passing the token on the url, which msal will parse and make available via get token silently. as typically a refresh token is returned, the msal library can use the refresh to get a new access token. if the refresh token is expired, the the msal library will redirect to login server.