Hi,
I am trying to setup a PCF for a canvas application integrated with MSAL, so that I can access other Azure services from the PCF. Can this be done? I tried using the PublicClientApplication to get the access token, but I am not sure what should be used for the redirect uri. I have tried ssoSilent and acquireTokenSilent methods.
I am able to get it to work in the local test environment. But, when I import it into powerapps, I get the following error.
BrowserAuthError: monitor_window_timeout: Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors.
Here is the config for the PublicClientApplication
this.msalConfig = {
auth: {
clientId: "xxxxxx",
authority:
},
cache: {
cacheLocation: "localStorage", // This configures where your cache will be stored
storeAuthStateInCookie: true, // Set this to "true" if you're having issues on Internet Explorer 11 or Edge
},
system: {
loggerOptions: {
loggerCallback: (
level: msal.LogLevel,
message: string,
containsPii: boolean
😞 void => {
if (containsPii) {
return;
}
switch (level) {
case msal.LogLevel.Error:
console.error(message);
return;
case msal.LogLevel.Info:
console.info(message);
return;
case msal.LogLevel.Verbose:
console.debug(message);
return;
case msal.LogLevel.Warning:
console.warn(message);
return;
}
},
piiLoggingEnabled: false,
logLevel: msal.LogLevel.Verbose,
},
windowHashTimeout: 60000,
iframeHashTimeout:60000,
loadFrameTimeout: 60000,
},
};