adal

How can I authenticate to AAD and call the Graph API as a Daemon Application with PowerShell?

℡╲_俬逩灬. 提交于 2019-12-02 13:56:20
I am trying to do some very quick tests on Azure Active Directory, and I want to use a Daemon Application to access the Graph API without needing a user present to authenticate. I want to verify that my application registration can successfully authenticate to AAD, that my client secret is valid, and make calls to the AAD Graph API. I have registered a "Web App/API" in my directory already, and I have set it up to have the appropriate permissions to call the AAD Graph API in the App Only Context. I have also generated an application key/certificate for my app so that I can authenticate as a

Authorization_IdentityNotFound error MS Graph API

此生再无相见时 提交于 2019-12-02 10:51:44
Our application is going to do simple User.ReadBasic.All functions, which from what I understand do not require Admin permissions. Using the flow documented here: https://graph.microsoft.io/en-us/docs/authorization/app_only POST https://login.microsoftonline.com/{tenantId}/oauth2/token HTTP/1.1 Content-Type: application/x-www-form-urlencoded grant_type=client_credentials &client_id=<clientId> &client_secret=<clientSecret> &resource=https://graph.microsoft.com I am able to get a valid access token, however when calling the graph the following error message is returned: “code": "Authorization

ADAL: W8.1 app trying to log user out

柔情痞子 提交于 2019-12-02 03:33:26
问题 I've got a proof of concept W8.1-app that allows to authenticate a user with an Azure Active Directory using the ADAL library. I've got the part of allowing the user to log in and accessing my resources working. However, it should be able to allow the user to log out, and allow another user to log in on the same device. I've found other questions, on SO and elsewhere, regarding a similar question, but on IOS or in a WPF-app. There, they suggested calling the <AuthenticationContext>.TokenCache

ADAL: W8.1 app trying to log user out

淺唱寂寞╮ 提交于 2019-12-02 01:39:46
I've got a proof of concept W8.1-app that allows to authenticate a user with an Azure Active Directory using the ADAL library. I've got the part of allowing the user to log in and accessing my resources working. However, it should be able to allow the user to log out, and allow another user to log in on the same device. I've found other questions, on SO and elsewhere, regarding a similar question, but on IOS or in a WPF-app. There, they suggested calling the <AuthenticationContext>.TokenCache.Clear() and clearing the cookies by the using the following call: private void ClearCookies() { const

How do I make 'forgot password' working in react-aad-msal with Azure AD B2C?

笑着哭i 提交于 2019-12-01 22:03:57
I am using react-aad-msal with Azure AD B2C. I have sign-in and sign-out working. However, when I click 'Forgot your password?', the auth window disappears and nothing happens. It seems I need to specify name of my 'forgot password' policy, but I do not know where to put it. Based on Tony's answer added this code to my App's render: if (window.location.href.indexOf("error_description=AADB2C90118") >= 0) { return <AzureAD provider={ new MsalAuthProviderFactory({ authority: 'https://login.microsoftonline.com/tfp/x5aaas.onmicrosoft.com/B2C_1_PwdReset', clientID: 'a1568977-3095-4bf6-a6d6

How do I make 'forgot password' working in react-aad-msal with Azure AD B2C?

血红的双手。 提交于 2019-12-01 18:57:50
问题 I am using react-aad-msal with Azure AD B2C. I have sign-in and sign-out working. However, when I click 'Forgot your password?', the auth window disappears and nothing happens. It seems I need to specify name of my 'forgot password' policy, but I do not know where to put it. Based on Tony's answer added this code to my App's render: if (window.location.href.indexOf("error_description=AADB2C90118") >= 0) { return <AzureAD provider={ new MsalAuthProviderFactory({ authority: 'https://login

Correct ADAL package for B2C - Xamarin PCL project

徘徊边缘 提交于 2019-12-01 12:09:07
I have read several articles on adding Azure Active Directory sign-in functionality to Xamarin PCL projects (e.g. https://blog.xamarin.com/put-adal-xamarin-forms/ ) but I am still not able to make it work. Can someone please clarifiy the correct ADAL package to use for Azure B2C AD(for Xamarin PCL project)? Is it: Microsoft.IdentityModel.Clients.ActiveDirectory OR Microsoft.Experimental.IdentityModel.Clients.ActiveDirectory Thanks! Thanks to @Kaush and @vibronet for pointing me in the right direction, saving a lot of time. For anyone wanting to add B2C Sign-In & Sign-Up flows to a Xamarin

Can users from an unmanaged Azure AD directory, sign into an Azure AD multi-tenant application which resides in a different directory?

时光怂恿深爱的人放手 提交于 2019-12-01 11:33:26
I'm trying out Azure AD B2B capabilities for my company. I have tried to invite external users through the portal and by using https://graph.microsoft.com/beta/invitations . Users are successfully invited and added to our directory in both scenarios. Login works for social accounts (that then use a Microsoft account). If it's a non-social account aka contoso.com, that does not have an Azure AD from before, I get an access_denied when our application tries to log in the user. If I try to force a consent flow, I get the following message: AADSTS65005: The application zzz is currently not

Angular HTTP Interceptor how to chain an observable

强颜欢笑 提交于 2019-12-01 08:49:10
I am using the Azure AD adal library to do authentication. There is a call to aquire a token that returns an observable. How can this observable be added into the intercept? In the below example, how can I get the request that is set inside the subscribe to be returned as the Observable? intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { this.authAzureService.getAccessToken() .subscribe(token => { // I need this to be returned request = this.getRequestWithHeaders(request, token); }); // This returns the request before the access token is added return next

How to debug/trace ADAL authentication?

拥有回忆 提交于 2019-12-01 08:39:33
I was trying one of the Azure Active Directory samples Microsoft has published here: https://github.com/AzureADSamples/WebApp-WebAPI-OpenIDConnect-DotNet I managed to screw up the audience value in the web.config for the TodoListService and got a 401 Unauthorized response when calling the service. The problem is, it took me way too long to figure out what was wrong. Running it in the debugger did not produce any helpful trace statements in the output window. There were also no events in the event viewer. Is there any configuration I can turn on which would have helped my find this more quickly