Consuming Id_token from Azure using UseWindowsAzureActiveDirectoryBearerAuthentication
Needing help from anyone.
I have a SPA client application that is talking to a WebApi (.Net 4.52). Both have been developed by my company. It has been working quite fine with tokens that the WebAPI has been generating itself (based on the excellent articles from bitoftech)
We now want to allow authentication with Azure - more specifically, my customer's own azure tenant (which I have no direct control over). To do this on the client-side, we use adal.js to do the back and forth with actually signing the user in, and we use UseWindowsAzureActiveDirectoryBearerAuthentication on the server-side to validate the azure tokens.
The Oauth startup looks like this:
public static void RunAcademyOAuthStartup(IAppBuilder app)
{
if (ConfigurationManager.AppSettings["ida:Enabled"] == "1")
{
app.UseWindowsAzureActiveDirectoryBearerAuthentication(
new WindowsAzureActiveDirectoryBearerAuthenticationOptions
{
TokenValidationParameters = new System.IdentityModel.Tokens.TokenValidationParameters
{
ValidAudience = ConfigurationManager.AppSettings["ida:Audience"],
AuthenticationType = "ExternalAzureSSO"
},
Tenant = ConfigurationManager.AppSettings["ida:Tenant"]
}
);
}
var apiAccessTokenLifeTimeSeconds = 0;
if (!int.TryParse(ConfigurationManager.AppSettings["ApiAccessTokenLifetimeSeconds"], out apiAccessTokenLifeTimeSeconds))
{
apiAccessTokenLifeTimeSeconds = 1800; //set default to 30 minutes
}
var oAuthServerOptions = new OAuthAuthorizationServerOptions()
{
AllowInsecureHttp = true,
TokenEndpointPath = new PathString("/api/user/authenticate"),
AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(apiAccessTokenLifeTimeSeconds),
Provider = new SimpleAuthorizationServerProvider(),
RefreshTokenProvider = new SimpleRefreshTokenProvider(),
AuthenticationType = "LocalApplication"
};
OAuthBearerOptions = new OAuthBearerAuthenticationOptions();
// Token Generation - setup the token authorization server
app.UseOAuthAuthorizationServer(oAuthServerOptions);
app.UseOAuthBearerAuthentication(OAuthBearerOptions);
}
The code above is no different to hundreds of other examples I've been trawling through for days.
This all works fine when I use my free Azure instance (through my company's MSDN) - I can authenticate, the token comes back from azure, webapi can decode it and validate and it continues on.
My problem arises when I try this against my customer's P1 Azure instance - I can authenticate, get a token back, but my webapi does not decode the token. There is no errors logged as far as I can see.
The main thing I can see at the moment is when I get the azure token and decode it using jwt.io, I can see the "x5t" and "kid" values. Based on other information I have found around the 'net, I should be able to get the latest keys from https://login.microsoftonline.com/common/discovery/keys and find either the "x5t" and/or the "kid" values in there....but I can't.
Is this possible? What would cause a token to be generated with keys other than the common ones? Is this a configuration item within the app registration in azure? Do I need to add more settings to the UseWindowsAzureActiveDirectoryBearerAuthentication config in web api?
Tokens are all v1
c# asp.net azure authentication
|
show 5 more comments
Needing help from anyone.
I have a SPA client application that is talking to a WebApi (.Net 4.52). Both have been developed by my company. It has been working quite fine with tokens that the WebAPI has been generating itself (based on the excellent articles from bitoftech)
We now want to allow authentication with Azure - more specifically, my customer's own azure tenant (which I have no direct control over). To do this on the client-side, we use adal.js to do the back and forth with actually signing the user in, and we use UseWindowsAzureActiveDirectoryBearerAuthentication on the server-side to validate the azure tokens.
The Oauth startup looks like this:
public static void RunAcademyOAuthStartup(IAppBuilder app)
{
if (ConfigurationManager.AppSettings["ida:Enabled"] == "1")
{
app.UseWindowsAzureActiveDirectoryBearerAuthentication(
new WindowsAzureActiveDirectoryBearerAuthenticationOptions
{
TokenValidationParameters = new System.IdentityModel.Tokens.TokenValidationParameters
{
ValidAudience = ConfigurationManager.AppSettings["ida:Audience"],
AuthenticationType = "ExternalAzureSSO"
},
Tenant = ConfigurationManager.AppSettings["ida:Tenant"]
}
);
}
var apiAccessTokenLifeTimeSeconds = 0;
if (!int.TryParse(ConfigurationManager.AppSettings["ApiAccessTokenLifetimeSeconds"], out apiAccessTokenLifeTimeSeconds))
{
apiAccessTokenLifeTimeSeconds = 1800; //set default to 30 minutes
}
var oAuthServerOptions = new OAuthAuthorizationServerOptions()
{
AllowInsecureHttp = true,
TokenEndpointPath = new PathString("/api/user/authenticate"),
AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(apiAccessTokenLifeTimeSeconds),
Provider = new SimpleAuthorizationServerProvider(),
RefreshTokenProvider = new SimpleRefreshTokenProvider(),
AuthenticationType = "LocalApplication"
};
OAuthBearerOptions = new OAuthBearerAuthenticationOptions();
// Token Generation - setup the token authorization server
app.UseOAuthAuthorizationServer(oAuthServerOptions);
app.UseOAuthBearerAuthentication(OAuthBearerOptions);
}
The code above is no different to hundreds of other examples I've been trawling through for days.
This all works fine when I use my free Azure instance (through my company's MSDN) - I can authenticate, the token comes back from azure, webapi can decode it and validate and it continues on.
My problem arises when I try this against my customer's P1 Azure instance - I can authenticate, get a token back, but my webapi does not decode the token. There is no errors logged as far as I can see.
The main thing I can see at the moment is when I get the azure token and decode it using jwt.io, I can see the "x5t" and "kid" values. Based on other information I have found around the 'net, I should be able to get the latest keys from https://login.microsoftonline.com/common/discovery/keys and find either the "x5t" and/or the "kid" values in there....but I can't.
Is this possible? What would cause a token to be generated with keys other than the common ones? Is this a configuration item within the app registration in azure? Do I need to add more settings to the UseWindowsAzureActiveDirectoryBearerAuthentication config in web api?
Tokens are all v1
c# asp.net azure authentication
What's yourida:Tenant
value?
– juunas
Nov 13 '18 at 6:44
Also, you should not use Id tokens to authenticate to APIs, you should use access tokens. This requires you to register two apps in Azure AD, one Native for the front-end and one Web app/API for the API. The front-end should then acquire access tokens to call the API.
– juunas
Nov 13 '18 at 6:46
Another question is do you want to support any Azure AD or just the one?
– juunas
Nov 13 '18 at 6:46
HI Juunas, not sure I can tell you what the Tenant value is - I don't think my customer wants that right out in a public forum (even if it is public info). With registering the WebAPI in Azure as well, I have read about that but I have 2 things: 1. Id tokens and access tokens are very similar and I have some custom code inside the webapi that is verifying the claims in the id token. 2. the whole process works happily against my free azure ad without having to register the api as well. Each instance of my application is only going to work with the one azure tenant.
– tumblebug999
Nov 13 '18 at 7:08
Yeah, you don't need to say the Tenant value, I just wanna know if it'scommon
or a tenant id. Since you have set it to the customer tenant id, it should load the signing keys on startup from the URL you mentioned. All tenants should use the same signing keys, unless they are using e.g. the German/Chinese Azure Cloud.
– juunas
Nov 13 '18 at 7:55
|
show 5 more comments
Needing help from anyone.
I have a SPA client application that is talking to a WebApi (.Net 4.52). Both have been developed by my company. It has been working quite fine with tokens that the WebAPI has been generating itself (based on the excellent articles from bitoftech)
We now want to allow authentication with Azure - more specifically, my customer's own azure tenant (which I have no direct control over). To do this on the client-side, we use adal.js to do the back and forth with actually signing the user in, and we use UseWindowsAzureActiveDirectoryBearerAuthentication on the server-side to validate the azure tokens.
The Oauth startup looks like this:
public static void RunAcademyOAuthStartup(IAppBuilder app)
{
if (ConfigurationManager.AppSettings["ida:Enabled"] == "1")
{
app.UseWindowsAzureActiveDirectoryBearerAuthentication(
new WindowsAzureActiveDirectoryBearerAuthenticationOptions
{
TokenValidationParameters = new System.IdentityModel.Tokens.TokenValidationParameters
{
ValidAudience = ConfigurationManager.AppSettings["ida:Audience"],
AuthenticationType = "ExternalAzureSSO"
},
Tenant = ConfigurationManager.AppSettings["ida:Tenant"]
}
);
}
var apiAccessTokenLifeTimeSeconds = 0;
if (!int.TryParse(ConfigurationManager.AppSettings["ApiAccessTokenLifetimeSeconds"], out apiAccessTokenLifeTimeSeconds))
{
apiAccessTokenLifeTimeSeconds = 1800; //set default to 30 minutes
}
var oAuthServerOptions = new OAuthAuthorizationServerOptions()
{
AllowInsecureHttp = true,
TokenEndpointPath = new PathString("/api/user/authenticate"),
AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(apiAccessTokenLifeTimeSeconds),
Provider = new SimpleAuthorizationServerProvider(),
RefreshTokenProvider = new SimpleRefreshTokenProvider(),
AuthenticationType = "LocalApplication"
};
OAuthBearerOptions = new OAuthBearerAuthenticationOptions();
// Token Generation - setup the token authorization server
app.UseOAuthAuthorizationServer(oAuthServerOptions);
app.UseOAuthBearerAuthentication(OAuthBearerOptions);
}
The code above is no different to hundreds of other examples I've been trawling through for days.
This all works fine when I use my free Azure instance (through my company's MSDN) - I can authenticate, the token comes back from azure, webapi can decode it and validate and it continues on.
My problem arises when I try this against my customer's P1 Azure instance - I can authenticate, get a token back, but my webapi does not decode the token. There is no errors logged as far as I can see.
The main thing I can see at the moment is when I get the azure token and decode it using jwt.io, I can see the "x5t" and "kid" values. Based on other information I have found around the 'net, I should be able to get the latest keys from https://login.microsoftonline.com/common/discovery/keys and find either the "x5t" and/or the "kid" values in there....but I can't.
Is this possible? What would cause a token to be generated with keys other than the common ones? Is this a configuration item within the app registration in azure? Do I need to add more settings to the UseWindowsAzureActiveDirectoryBearerAuthentication config in web api?
Tokens are all v1
c# asp.net azure authentication
Needing help from anyone.
I have a SPA client application that is talking to a WebApi (.Net 4.52). Both have been developed by my company. It has been working quite fine with tokens that the WebAPI has been generating itself (based on the excellent articles from bitoftech)
We now want to allow authentication with Azure - more specifically, my customer's own azure tenant (which I have no direct control over). To do this on the client-side, we use adal.js to do the back and forth with actually signing the user in, and we use UseWindowsAzureActiveDirectoryBearerAuthentication on the server-side to validate the azure tokens.
The Oauth startup looks like this:
public static void RunAcademyOAuthStartup(IAppBuilder app)
{
if (ConfigurationManager.AppSettings["ida:Enabled"] == "1")
{
app.UseWindowsAzureActiveDirectoryBearerAuthentication(
new WindowsAzureActiveDirectoryBearerAuthenticationOptions
{
TokenValidationParameters = new System.IdentityModel.Tokens.TokenValidationParameters
{
ValidAudience = ConfigurationManager.AppSettings["ida:Audience"],
AuthenticationType = "ExternalAzureSSO"
},
Tenant = ConfigurationManager.AppSettings["ida:Tenant"]
}
);
}
var apiAccessTokenLifeTimeSeconds = 0;
if (!int.TryParse(ConfigurationManager.AppSettings["ApiAccessTokenLifetimeSeconds"], out apiAccessTokenLifeTimeSeconds))
{
apiAccessTokenLifeTimeSeconds = 1800; //set default to 30 minutes
}
var oAuthServerOptions = new OAuthAuthorizationServerOptions()
{
AllowInsecureHttp = true,
TokenEndpointPath = new PathString("/api/user/authenticate"),
AccessTokenExpireTimeSpan = TimeSpan.FromMinutes(apiAccessTokenLifeTimeSeconds),
Provider = new SimpleAuthorizationServerProvider(),
RefreshTokenProvider = new SimpleRefreshTokenProvider(),
AuthenticationType = "LocalApplication"
};
OAuthBearerOptions = new OAuthBearerAuthenticationOptions();
// Token Generation - setup the token authorization server
app.UseOAuthAuthorizationServer(oAuthServerOptions);
app.UseOAuthBearerAuthentication(OAuthBearerOptions);
}
The code above is no different to hundreds of other examples I've been trawling through for days.
This all works fine when I use my free Azure instance (through my company's MSDN) - I can authenticate, the token comes back from azure, webapi can decode it and validate and it continues on.
My problem arises when I try this against my customer's P1 Azure instance - I can authenticate, get a token back, but my webapi does not decode the token. There is no errors logged as far as I can see.
The main thing I can see at the moment is when I get the azure token and decode it using jwt.io, I can see the "x5t" and "kid" values. Based on other information I have found around the 'net, I should be able to get the latest keys from https://login.microsoftonline.com/common/discovery/keys and find either the "x5t" and/or the "kid" values in there....but I can't.
Is this possible? What would cause a token to be generated with keys other than the common ones? Is this a configuration item within the app registration in azure? Do I need to add more settings to the UseWindowsAzureActiveDirectoryBearerAuthentication config in web api?
Tokens are all v1
c# asp.net azure authentication
c# asp.net azure authentication
asked Nov 13 '18 at 4:56
tumblebug999tumblebug999
414
414
What's yourida:Tenant
value?
– juunas
Nov 13 '18 at 6:44
Also, you should not use Id tokens to authenticate to APIs, you should use access tokens. This requires you to register two apps in Azure AD, one Native for the front-end and one Web app/API for the API. The front-end should then acquire access tokens to call the API.
– juunas
Nov 13 '18 at 6:46
Another question is do you want to support any Azure AD or just the one?
– juunas
Nov 13 '18 at 6:46
HI Juunas, not sure I can tell you what the Tenant value is - I don't think my customer wants that right out in a public forum (even if it is public info). With registering the WebAPI in Azure as well, I have read about that but I have 2 things: 1. Id tokens and access tokens are very similar and I have some custom code inside the webapi that is verifying the claims in the id token. 2. the whole process works happily against my free azure ad without having to register the api as well. Each instance of my application is only going to work with the one azure tenant.
– tumblebug999
Nov 13 '18 at 7:08
Yeah, you don't need to say the Tenant value, I just wanna know if it'scommon
or a tenant id. Since you have set it to the customer tenant id, it should load the signing keys on startup from the URL you mentioned. All tenants should use the same signing keys, unless they are using e.g. the German/Chinese Azure Cloud.
– juunas
Nov 13 '18 at 7:55
|
show 5 more comments
What's yourida:Tenant
value?
– juunas
Nov 13 '18 at 6:44
Also, you should not use Id tokens to authenticate to APIs, you should use access tokens. This requires you to register two apps in Azure AD, one Native for the front-end and one Web app/API for the API. The front-end should then acquire access tokens to call the API.
– juunas
Nov 13 '18 at 6:46
Another question is do you want to support any Azure AD or just the one?
– juunas
Nov 13 '18 at 6:46
HI Juunas, not sure I can tell you what the Tenant value is - I don't think my customer wants that right out in a public forum (even if it is public info). With registering the WebAPI in Azure as well, I have read about that but I have 2 things: 1. Id tokens and access tokens are very similar and I have some custom code inside the webapi that is verifying the claims in the id token. 2. the whole process works happily against my free azure ad without having to register the api as well. Each instance of my application is only going to work with the one azure tenant.
– tumblebug999
Nov 13 '18 at 7:08
Yeah, you don't need to say the Tenant value, I just wanna know if it'scommon
or a tenant id. Since you have set it to the customer tenant id, it should load the signing keys on startup from the URL you mentioned. All tenants should use the same signing keys, unless they are using e.g. the German/Chinese Azure Cloud.
– juunas
Nov 13 '18 at 7:55
What's your
ida:Tenant
value?– juunas
Nov 13 '18 at 6:44
What's your
ida:Tenant
value?– juunas
Nov 13 '18 at 6:44
Also, you should not use Id tokens to authenticate to APIs, you should use access tokens. This requires you to register two apps in Azure AD, one Native for the front-end and one Web app/API for the API. The front-end should then acquire access tokens to call the API.
– juunas
Nov 13 '18 at 6:46
Also, you should not use Id tokens to authenticate to APIs, you should use access tokens. This requires you to register two apps in Azure AD, one Native for the front-end and one Web app/API for the API. The front-end should then acquire access tokens to call the API.
– juunas
Nov 13 '18 at 6:46
Another question is do you want to support any Azure AD or just the one?
– juunas
Nov 13 '18 at 6:46
Another question is do you want to support any Azure AD or just the one?
– juunas
Nov 13 '18 at 6:46
HI Juunas, not sure I can tell you what the Tenant value is - I don't think my customer wants that right out in a public forum (even if it is public info). With registering the WebAPI in Azure as well, I have read about that but I have 2 things: 1. Id tokens and access tokens are very similar and I have some custom code inside the webapi that is verifying the claims in the id token. 2. the whole process works happily against my free azure ad without having to register the api as well. Each instance of my application is only going to work with the one azure tenant.
– tumblebug999
Nov 13 '18 at 7:08
HI Juunas, not sure I can tell you what the Tenant value is - I don't think my customer wants that right out in a public forum (even if it is public info). With registering the WebAPI in Azure as well, I have read about that but I have 2 things: 1. Id tokens and access tokens are very similar and I have some custom code inside the webapi that is verifying the claims in the id token. 2. the whole process works happily against my free azure ad without having to register the api as well. Each instance of my application is only going to work with the one azure tenant.
– tumblebug999
Nov 13 '18 at 7:08
Yeah, you don't need to say the Tenant value, I just wanna know if it's
common
or a tenant id. Since you have set it to the customer tenant id, it should load the signing keys on startup from the URL you mentioned. All tenants should use the same signing keys, unless they are using e.g. the German/Chinese Azure Cloud.– juunas
Nov 13 '18 at 7:55
Yeah, you don't need to say the Tenant value, I just wanna know if it's
common
or a tenant id. Since you have set it to the customer tenant id, it should load the signing keys on startup from the URL you mentioned. All tenants should use the same signing keys, unless they are using e.g. the German/Chinese Azure Cloud.– juunas
Nov 13 '18 at 7:55
|
show 5 more comments
1 Answer
1
active
oldest
votes
An answer for anyone who is coming across this thread in the future...probably a rookie mistake :)
What I found in my case was that the admin on the Azure side had registered my application using the "Enterprise Applications" option in their Azure Portal BEFORE editing the manifest,etc in the "App Registrations" area. According to Microsoft Support, it should be done the other way around - register in App Registrations first, then go to Enterprise Applications (if needed). Doing things in that order means that the azure tenant then generates the tokens and signs them with the "common" keys, and not the custom key that a Enterprise App gets.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53274053%2fconsuming-id-token-from-azure-using-usewindowsazureactivedirectorybearerauthenti%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
An answer for anyone who is coming across this thread in the future...probably a rookie mistake :)
What I found in my case was that the admin on the Azure side had registered my application using the "Enterprise Applications" option in their Azure Portal BEFORE editing the manifest,etc in the "App Registrations" area. According to Microsoft Support, it should be done the other way around - register in App Registrations first, then go to Enterprise Applications (if needed). Doing things in that order means that the azure tenant then generates the tokens and signs them with the "common" keys, and not the custom key that a Enterprise App gets.
add a comment |
An answer for anyone who is coming across this thread in the future...probably a rookie mistake :)
What I found in my case was that the admin on the Azure side had registered my application using the "Enterprise Applications" option in their Azure Portal BEFORE editing the manifest,etc in the "App Registrations" area. According to Microsoft Support, it should be done the other way around - register in App Registrations first, then go to Enterprise Applications (if needed). Doing things in that order means that the azure tenant then generates the tokens and signs them with the "common" keys, and not the custom key that a Enterprise App gets.
add a comment |
An answer for anyone who is coming across this thread in the future...probably a rookie mistake :)
What I found in my case was that the admin on the Azure side had registered my application using the "Enterprise Applications" option in their Azure Portal BEFORE editing the manifest,etc in the "App Registrations" area. According to Microsoft Support, it should be done the other way around - register in App Registrations first, then go to Enterprise Applications (if needed). Doing things in that order means that the azure tenant then generates the tokens and signs them with the "common" keys, and not the custom key that a Enterprise App gets.
An answer for anyone who is coming across this thread in the future...probably a rookie mistake :)
What I found in my case was that the admin on the Azure side had registered my application using the "Enterprise Applications" option in their Azure Portal BEFORE editing the manifest,etc in the "App Registrations" area. According to Microsoft Support, it should be done the other way around - register in App Registrations first, then go to Enterprise Applications (if needed). Doing things in that order means that the azure tenant then generates the tokens and signs them with the "common" keys, and not the custom key that a Enterprise App gets.
answered Nov 19 '18 at 22:04
tumblebug999tumblebug999
414
414
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53274053%2fconsuming-id-token-from-azure-using-usewindowsazureactivedirectorybearerauthenti%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What's your
ida:Tenant
value?– juunas
Nov 13 '18 at 6:44
Also, you should not use Id tokens to authenticate to APIs, you should use access tokens. This requires you to register two apps in Azure AD, one Native for the front-end and one Web app/API for the API. The front-end should then acquire access tokens to call the API.
– juunas
Nov 13 '18 at 6:46
Another question is do you want to support any Azure AD or just the one?
– juunas
Nov 13 '18 at 6:46
HI Juunas, not sure I can tell you what the Tenant value is - I don't think my customer wants that right out in a public forum (even if it is public info). With registering the WebAPI in Azure as well, I have read about that but I have 2 things: 1. Id tokens and access tokens are very similar and I have some custom code inside the webapi that is verifying the claims in the id token. 2. the whole process works happily against my free azure ad without having to register the api as well. Each instance of my application is only going to work with the one azure tenant.
– tumblebug999
Nov 13 '18 at 7:08
Yeah, you don't need to say the Tenant value, I just wanna know if it's
common
or a tenant id. Since you have set it to the customer tenant id, it should load the signing keys on startup from the URL you mentioned. All tenants should use the same signing keys, unless they are using e.g. the German/Chinese Azure Cloud.– juunas
Nov 13 '18 at 7:55