Closed stefan1st closed 3 years ago
As hinted in the error message, the configuration of the application in the AAD portal is not correct.
As hinted in the error message, the configuration of the application in the AAD portal is not correct.
Well, I've tried this, and I have the same error. Am I missing something?
Not sure what else without diving into code. I can say that Username/Password is not really the best choice anymore. I would use the Interactive or DeviceCode providers instead. There are samples in the Graph.Community library.
Also, the Bot Framework allows for getting a token thru an OAuth dialog or using single sign-on.
+1 to what Paul said.
The username password flow doesn't use a redirect URI. Try removing it.
IPublicClientApplication publicClientApplication = PublicClientApplicationBuilder
.Create(_microsoftAppId)
.WithTenantId(_microsoftAppTenantId)
//.WithRedirectUri(_redirectUrl)
.Build();
Also, check from your app registration that public applications are enabled.
Are you able to successfully use this flow?
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
I have created an auth provider using user-password auth provider and trying to retrieve calendar events in bot code which is in c#.
Inner Exception :
Error={Code: generalException Message: Unexpected exception returned from MSAL. }
Inner Exception Message:
StackTrace :
My Code:
`var attendees = new List()
{
new AttendeeBase
{
EmailAddress = new EmailAddress
{
Address = "gerald@Hughes.eu",
Name = "Gerald Hughes"
},
Type = AttendeeType.Required
}
};
AB#7216