adal

In Active Directory, what is a resource?

怎甘沉沦 提交于 2019-12-22 05:54:10
问题 In the examples and tests for the AAD node.js library, 00000002-0000-0000-c000-000000000000 is always passed as the resource. What is 00000002-0000-0000-c000-000000000000 ? The documentation just says that a resource is "A URI that identifies the resource for which the token is valid." But 00000002-0000-0000-c000-000000000000 is a UUID. What is a resource, and what can the value here be? 回答1: Just to answer one part of your question, 00000002-0000-0000-c000-000000000000 is the app id of the

How to wait for 'AuthenticationContext.AcquireTokenAsync()' synchronouslly?

大兔子大兔子 提交于 2019-12-22 05:21:33
问题 First of all, I'm not sure if this is important, but for the reasons mentioned by @ Simon Mourier in him answer , I'm using the EXPERIMENTAL build of ADAL, this one . In the code below, I would like to retrieve an AuthenticationResult synchronouslly, so, I will wait for completition of the authentication by AcquireTokenAsync method in a synchronous manner. This is because a boolean flag should be set after the authorization is done ( isAuthorized = true ), but tgis need to happen in a

Unauthorized HTTP request to Dynamics CRM Web API via Angular 2 using ADAL

浪尽此生 提交于 2019-12-21 05:13:09
问题 I'm trying to create an application using Angular that can connect to Dynamics CRM via the Web API. These are the steps I have followed: 1. Registered a native application in Azure, granted the required delegated permissions and updated the manifest to allow implicit flow. 2. Created an Application User in CRM, setting its Application ID equal to the Client ID of my Azure registered application. Assigned my Application User a custom Security Role. 3. Cloned many Angular 2 quickstart Git

DNX Core 5.0 JwtSecurityTokenHandler “IDX10640: Algorithm is not supported: 'http://www.w3.org/2001/04/xmldsig-more#hmac-sha256'”

[亡魂溺海] 提交于 2019-12-21 05:05:52
问题 I'm trying to implement JWT tokens but keep running into the following exception: IDX10640: Algorithm is not supported: 'http://www.w3.org/2001/04/xmldsig-more#hmac-sha256' when trying to write the token to compact json string. const string issuer = "issuer"; const string audience = "audience"; byte[] keyForHmacSha256 = new byte[32]; new Random().NextBytes(keyForHmacSha256); var claims = new List<Claim> { new Claim("deviceId", "12") }; var now = DateTime.UtcNow; var expires = now.AddHours(1);

how can I get refresh token

这一生的挚爱 提交于 2019-12-21 04:28:12
问题 i learn this code sample :https://github.com/Azure-Samples/active-directory-dotnet-graphapi-web ,and yes ,i can get access token in AuthorizationCodeReceived : AuthenticationHelper.token = result.AccessToken; but how do i get the refresh token ?result.RefreshToken is not available , then how do i use acquiretokenbyrefreshtoken function ? https://msdn.microsoft.com/en-us/library/microsoft.identitymodel.clients.activedirectory.authenticationcontext.acquiretokenbyrefreshtoken.aspx 回答1: The

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

狂风中的少年 提交于 2019-12-20 07:43:19
问题 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

Authorization_IdentityNotFound error MS Graph API

﹥>﹥吖頭↗ 提交于 2019-12-20 05:39:51
问题 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

How to use RenewToken method of MSADAL in Angular 6+?

随声附和 提交于 2019-12-20 04:37:57
问题 I am using MS Adal NPM package (https://www.npmjs.com/package/microsoft-adal-angular6) for Angular 6 to get the user Authenticated with Azure AD. I am using Implicit Flow to get the Access token. I have been able to get Access token succesfully, with the following code in the constructor. if (!this.adalSvc.userInfo) { this.adalSvc.login(); } else { const token = this.adalSvc.acquireToken('https://graph.microsoft.com').subscribe((token: string) => { localStorage.setItem('authtoken', token); })

Passport-Azure-Ad seems to run asynchronously

▼魔方 西西 提交于 2019-12-20 04:26:19
问题 I am using TSED - TypeScript Express Decorators (https://tsed.io) and it replaces express code like: server.get('/api/tasks', passport.authenticate('oauth-bearer', { session: false }), listTasks); With an annotated middleware class - https://tsed.io/docs/middlewares.html So now the call to passport.authenticate() is in the use() method like: @OverrideMiddleware(AuthenticatedMiddleware) export class UserAuthMiddleware implements IMiddleware { constructor(@Inject() private authService:

Error AADSTS90002 on aquire authentication token for Dynamics 365

不问归期 提交于 2019-12-20 04:24:34
问题 I am encountering the following error when attempting to authenticate with Dynamics 365 from my .Net client: AADSTS90002: Tenant authorize not found. This may happen if there are no active subscriptions for the tenant. Check with your subscription administrator. Here is the code I am currently using: AuthenticationParameters authenticationParameters = AuthenticationParameters.CreateFromResourceUrlAsync(new Uri("https://dev-aec-ssp.api.crm6.dynamics.com/api/data/v9.1/")).Result;