URL to a portal application - portal

When a portal application is run using RAD/ or any IDE, the portal server will generate a random URL for the application, which expires after some time.
If I had an portal application like HelloWorld, how do I get a permanent URL like:
myportal/HelloWorld/
instead of a randomly generated URL. This question could also be asked like, how can I get a unique URL to my portal application

When you go to place a portlet in a more permanent place in your Portal, you will create the page yourself rather than letting RAD generate something random for you. Part of the options for a page is a friendly URL. So you could specify what URL you want after the /wps/myportal/. Here is a link to some basic documentation about creating pages.

If you want smth like /wps/myportal/HelloWorld you need create portal page and give it friendly name. Then you can deploy and place you portlet application(s) on this page.
If you to have application outside portal context (servlet for example), you need deploy it to WAS directly and set desired context root to get yourserver:10039/your/app/context

Related

azure-api-management different link to navigation items for different environments

For our api management portal we have different environments, development to production. We create our pages in DEV and push them through with migrate via a pipeline.
For the sign up navigation item I am using a link to to open a account creation page on a self hosted website. For example, on development this links to 'dev.login.com'. For prod I want to link this to 'login.com'. Is this supported?
When I capture my api management with the capture script I can find my link in the snapshot data.json file
As per our understanding, you want to create an API portal where the URL will be redirected to the login page with the different environments. Here is the example where you can use the redirection to login URL for which you need to create suffix as per the below image.
After creating API you need to add operation
Once the operation is created now by using Return Response policy you can redirect the URL to the login page.
For complete information, you can go through the related discussions SO and Microsoft Q&A

How to customize elements of the Azure AD B2C page while still using Azure's template

My business has the requirement of doing below changes while still using Azure blue template in Azure B2C's login page. Can someone point me in the right direction on how to achieve this?
B2C login page
If you need styling customization you need to go with your own template. If you want to be as close to the default one provided then you need to download it, change and use as your custom one. To do that just open Developer Tools in the browser, open your user flow and find something similar to this (image below) in the Network tab of Developer Tools:
Just double click it and the new page with template used with your flow will open. Just save it as HTML and you are free to go. Don't forget about checking any extenal references (CSS, JS, etc). Depending on what will you be changing you might want to download them and host on your own as well.

How to block crawling of the origin when Azure CDN is configured

something is not clear using Azure CDN.
I explain step by step what I have done since my website has been created. Call my website www.mypublicwebsite.com. So:
I created a web app on Azure. The website has the following url: https://mypublicwebsite.azurewebsites.net;
I created a custom domain www.mypublicwebsite.com
I redirected all the request from https://mypublicwebsite.azurewebsites.net to www.mypublicwebsite.com. So I solved the problem of duplicated contents for crawlers.
Everything is fine. Then, I decided to create CDN, according the documentation. Here the confusion starts.
I created the CDN profile
I created the endpoint. The endpoint has a new url https://mypublicwebsite.azureedge.net
I deleted the custom domain from web app;
I created the custom domain in cdn profile.
So the current state is this:
This situation is really problematic for SEO!! It cannot be the correct configuration. My contents are triplicated.
I partially solved the situation:
I redirected all the request from https://mypublicwebsite.azureedge.net to www.mypublicwebsite.com. So I solved the problem of duplicated content for crawlers.
But crawler (and perhaps users?) can still navigate the origin web site. I have been looking for different solutions:
Make a redirect from https://mypublicwebsite.azurewebsites.net to www.mypublicwebsite.com. But this create a infinite redirects loop between the CDN and the origin.
Try to hide the origin, but how?
I am honestly starting thinking this is not the correct way to manage cdn.
Can anyone help me please?
Thank you

How do I link from one Azure AD custom page to another

I have a link on my website that takes a user to the Azure AD edit profile page. I have customized that page by adding 2 links at the bottom. One is for the user to change their password and the other is to update a phone number. These are 3 different policies within Azure AD. When I initially link to the page from my site I am sending a clientID and a redirect_uri in the query string. Unfortunately this is getting converted to a csrf_token and those query string parameters are gone so I don't have access to them to include them in the change password and change phone number links. When the user clicks on the links obviously they fail. How do I link someone from one custom policy page to another page in Azure Active Directory? My custom page uses javascript, css, and html. No server side code other than what Microsoft injects.
You should have a link back to your application, and your application should understand that this route starts a new authentication journey with the appropriate authentication library with the desired policyId for this URL path. Do not link B2C journeys directly from within your custom HTML, you go via your application.

Where to get the Redirect URI and/or ClientId of an existing Asp.Net Core App

I have an existing asp.net core 2.0 web app that uses a local database to store logins (individual user accounts). However, I now want to hide a page on the applications behind AD authentication.
I created another test app selecting 'work or school accounts' to see what that looks like, using the correct domain. That new app lets me log in with my work AD account right off the bat, and so I took all of the relevant code from that new test app and put it in my old application so that it routes to that microsoft sign in page when you click the correct page link. Everything seems to be working and hooked up correctly, except after logging in I get this message:
AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application: '[the ClientId I put in appsettings]'
I copied over the appsettings section as well from the test project for the AzureAd configuration, but of course I need the ClientId for my already existing project, not from the test project. The relevant appsettings section looks like this:
"AzureAd": {
"Instance": "https://login.microsoftonline.com/",
"Domain": "XXXX.com",
"TenantId": "XXXXXXXXXXXXXXXXX", //this seems to be the same everywhere and is fine?
"ClientId": "XXXXXXXXXXXXXXXXX", //this is app specific and generated automatically when the app is created?
"CallbackPath": "/signin-oidc"
},
My question is, where can I find that ClientId for my existing application? Every answer to this I look says you have to get it or set it up in Azure, but we don't actually use Azure, instead that ClientId is generated automatically by Visual Studio when I create the application (it still works for logging in on the test app so I guess I don't need azure for this?). Where do I get the ClientId for an existing app? Or, how can I add it to an existing app? Or generate one that will be accepted?
Thanks
EDIT (added from comment below):
thanks for your response. I have logged into azure portal. The test application I made was in there, but not the new application that was first made with local accounts. So, I added the new application, took it's generated applicationid and put it in the appsettings as the client id. I also generated a key for the application inside azure portal, but I am unsure what to do with that key. It appears now though that I am able to successfully authenticate, in that after logging it it gives me the "would you like to stay logged in..." option, but then on redirect it just does Working...indefinitely.so I think the issue now is with redirect.
The reply url I have in azure portal is just
https://localhost:44320/signin-oidc
I just put that in there to imitate the working test application which has the same thing but a different number, (this number matches the local host number that the new app uses in developement in launch settings). In the c# in AccountController I have tried a lot of things including the default
var redirectUrl = Url.Action(nameof(HomeController.Index), "Home");
but the redirect always gets stuck on Working...
Also, strangely, now every link on the site redirects to the azure login, rather than only the one link I initially setup to redirect to the login action on the accountcontroller for azure, which is odd and not the behavior I need. How do I fix that?
thanks
The other answers here are correct. If you were able to successfully publish the app from Visual Studio, a Client ID would have already been generated. Use your Visual Studio account to log into the Azure portal. Then find the app by either searching the name from the resources list or checking under the App Services blade. When you click into the app, you will want to copy the Application ID and paste it into the Client ID section in the web.config. (Client ID and Application ID are synonymous even though they are named differently.)
With regard to the reply URL question, you just need to make sure that the Redirect URI and the reply URLs are matching. Normally you would just put the application homepage URL in both sections, unless you wanted to direct the users somewhere else. (So it would just be https://myapp.azurewebsites.net)

Resources