Hello All,
We have configured web app and web api on Azure as per the sample code and instructions provided by Micosoft (https://github.com/Azure-Samples/active-directory-b2c-dotnet-webapp-and-webapi)
What is the issue? When I am trying to access the token in web controller, I am getting the following error: "No account or login hint was passed to the AcquireTokenSilent call."
Refer the following image where we can making a call to get the token.

Refer the following image where the method details are there.

The main issue is, account is coming as null. Refer the following image:-

We are not able to find where is the issue, why account is coming as null.
So I did the following to ensure web api is configured properly:-
Added one more redirect uri on Web Api on Azure (https://www.postman.com/oauth2/callback) for postman
Added all configuration in postman
Started the web api project locally
Manage to get access token
Able to hit one end point successfully to the web api(Get call)
Able one end point successfully to the web api (Post call)
So this test ensures that web api project is configured in Azure and working fine using Azure AD B2C Authentication.
I did a similar test by running a userflow againts the web api project and I could see tokens getting generated (Not sure if this is a legitimate test)
I have been reading the issue on internet.But not able to find an exact issue like this. Any pointers would be very hekpfull.
best regards
Hello All,
We have configured web app and web api on Azure as per the sample code and instructions provided by Micosoft (https://github.com/Azure-Samples/active-directory-b2c-dotnet-webapp-and-webapi)
What is the issue? When I am trying to access the token in web controller, I am getting the following error: "No account or login hint was passed to the AcquireTokenSilent call."
Refer the following image where we can making a call to get the token.

Refer the following image where the method details are there.

The main issue is, account is coming as null. Refer the following image:-

We are not able to find where is the issue, why account is coming as null.
So I did the following to ensure web api is configured properly:-
Added one more redirect uri on Web Api on Azure (https://www.postman.com/oauth2/callback) for postman
Added all configuration in postman
Started the web api project locally
Manage to get access token
Able to hit one end point successfully to the web api(Get call)
Able one end point successfully to the web api (Post call)
So this test ensures that web api project is configured in Azure and working fine using Azure AD B2C Authentication.
I did a similar test by running a userflow againts the web api project and I could see tokens getting generated (Not sure if this is a legitimate test)
I have been reading the issue on internet.But not able to find an exact issue like this. Any pointers would be very hekpfull.
best regards