How to get only List of all properties of User through Graph API - azure

I am working on CRUD operation of User on Azure AD. I will use Java to handle it.
My requirement is I want one Graph API reference or any other utility through which I will get list of Users all properties like 'accountEnabled', 'displayName', 'mailNickname', 'userPrincipalName' ,'passwordProfile' .... there are so many.
I am trying to get from below API:
https://graph.microsoft.com/v1.0/$metadata
But here, I am getting huge data in which User properties are also present.
Below is piece of response from above API:
<EntityType Name="user" BaseType="microsoft.graph.directoryObject" OpenType="true">
<Property Name="accountEnabled" Type="Edm.Boolean" />
<Property Name="ageGroup" Type="Edm.String" />
<Property Name="assignedLicenses" Type="Collection(microsoft.graph.assignedLicense)" Nullable="false" />
<Property Name="assignedPlans" Type="Collection(microsoft.graph.assignedPlan)" Nullable="false" />
<Property Name="businessPhones" Type="Collection(Edm.String)" Nullable="false" />
<Property Name="city" Type="Edm.String" />
likewise there are so many tags
Can anyone know how to get it?
Any help is much appreciated!!

The $metadata document has a list of all entities like users and groups and I don't think there's a way to scope it down to just users. If you're not interested in parsing it, maybe look at the Graph SDK and use reflection? The SDKs are generated from the Graph metadata so for example the Java SDK has all these properties on the User class - https://github.com/microsoftgraph/msgraph-sdk-java/blob/dev/src/main/java/com/microsoft/graph/models/generated/BaseUser.java#L201
You can check the microsoft graph github organization page for SDKs in other languages.

Related

Implement a connection between my application (Spring integration) with IBM-MQ - High Availability

I am trying to implement a connection between my application (Spring integration) with IBM-MQ, I did see the question spring-integration-support-for-clustered-high-availability-ibm-mq-manager, but in my case each host has different "queueManager" and "channels", it means I will have must have a configuration like follows but, the queueManager and channels properties support a String not a list values:
<bean id="connectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="connectionNameList" value="host1(6464),host1(6464)" />
<property name="clientReconnectTimeout" value="15000" />
<property name="transportType" value="1" />
<property name="queueManager" value="QM1, QM1," />
<property name="channel" value="channel1,channel1"/>
</bean>
The simplest thing would be to define a channel with the same name on both hosts and let the client try host1 first and then host2 using connectionNameList. In this setup it would always prefer host1. You would need to specify a queueManager that is blank so that the client will accept the queue manager it connects to. Example follows:
<property name="queueManager" value="" />
Another option that was pointed out in a comment from Morag on the other post you linked to is to use a CCDT (Client channel definition table).
See Using a client channel definition table with IBM WebSphere MQ classes for JMS. The property name is CCDTURL
The CCDT can have multiple CLNTCONN channel entries with different channel names all having the same QMNAME, this is called a Queue Manager Group, you would then specify the queueManager property as *QMNAME, this will allow the app to connect to which ever queue manager you are directed to with out regard to the actual queue manager name. There are other parameters of the CLNTCONN listed at the bottom of the link I provided that can help you to control if one queue manager is preferred over the other(s) as well as which queue manager to connect to if a reconnect is required.

CAS 4.x, & LDAP Attributes

I have the same problem as several other questions here, none of which have really been answered; that is, with CAS 4.x (4.2.6 actually) I cannot get LDAP attributes to return to the client application.
Question 1 This seems like overkill; custom code to get around what is a "simple" problem.
Question 2 Had already done this, and it didn't work.
So, now it's my turn to ask... is there some magic to making it work? We've used 3.5 for a long time without any issues. I'm trying to convert those settings to the 4.x Maven overlayer and new context configuration of 4.x, and it's not doin' it.
I can see in the logs that CAS is requesting, and getting the properties I'm looking for from LDAP. But they are not getting put in the token back to the application.
What more needs to be done beyond what the Apereo documentation lays out? I'm thinking it's the attribute repository maybe??? If something would help you help me through this, just ask: Config, Logs (redacted of course)... anything.
Thanks.
Update #1. Here is my resolvers list. NOTE: I keep code/settings in place commented out until I get it to work before I clean stuff out.
<util:map id="authenticationHandlersResolvers">
<!--
<entry key-ref="proxyAuthenticationHandler" value-ref="proxyPrincipalResolver" />
<entry key-ref="primaryAuthenticationHandler" value-ref="primaryPrincipalResolver" />
-->
<!--<entry key-ref="ldapAuthenticationHandler" value-ref="primaryPrincipalResolver" /> -->
<entry key-ref="ldapAuthenticationHandler" value="#{null}" />
</util:map>
Update #2
I've done more testing, and still am unsuccessful. I think, it's coming down to the principalAttributeMap of the LdapAuthenticationHandler not working, OR, the attributeReleasePolicy of the serviceRegistryDao... anyone see any issues in this config?
<bean id="ldapAuthenticationHandler" class="org.jasig.cas.authentication.LdapAuthenticationHandler"
p:principalIdAttribute="sAMAccountName"
c:authenticator-ref="authenticator"
>
<property name="principalAttributeMap">
<map>
<entry key="cn" value="cn" />
<entry key="mail" value="Email" />
<entry key="memberOf" value="Groups" />
<entry key="displayName" value="displayName" />
</map>
</property>
</bean>
<bean id="serviceRegistryDao" class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
<property name="registeredServices">
<list>
<bean class="org.jasig.cas.services.RegexRegisteredService"
p:id="5"
p:name="All Servicesxxx"
p:description="Allow connections for all services and protocols"
p:serviceId="^(http|https|imaps)://.*"
p:evaluationOrder="5"
>
<property name="attributeReleasePolicy">
<bean class="org.jasig.cas.services.ReturnAllAttributeReleasePolicy" />
</property>
</bean>
</list>
</property>
</bean>
To quote from CAS Security Guide:
All communication with the CAS server MUST occur over a secure channel
(i.e. TLSv1). There are two primary justifications for this
requirement:
The authentication process requires transmission of security
credentials.
The CAS ticket-granting ticket is a bearer token.
Since the disclosure of either data would allow impersonation attacks, it’s
vitally important to secure the communication channel between CAS
clients and the CAS server.
Practically, it means that all CAS urls must use HTTPS, but it also
means that all connections from the CAS server to the application must
be done using HTTPS:
when the generated service ticket is sent back to the application on the “service” url when a
proxy callback url is called.
HTTPS is a must in CAS. However, there are possibilities to disable it but it is highly recommended not to do so. If you have struggle to handle the SSL configuration, I recommend you read my question where I explain in detail how to deal with the keystores.

.webpart file EmptyMessage Property changes not reflecting

we are facing an issue where a custom webpart is alreay deployed in sharepoint and when we are trying to update its EmptyMessage Property and redeploying it, its not reflecting in UI,however, we can see the .webpart file has updated with new value. here is the code snippet of .webpart file
<property name="TitleUrl" type="string" />
<property name="EmptyMessage" type="string">Currently there are no features available. Please check back.</property>
<property name="ShowBestBets" type="bool">True</property>
<property name="ShowViewDuplicates" type="bool">True</property>
<property name="AllowHide" type="bool">False</property>
We're using ctx.ClientControl.get_emptyMessage() to read this property value.
This is by design.
[filename].webpart is just a template for web part instances in the pages. Existing pages save their web part parameters once the web parts are added in the pages. Web part properties in a particular page have no link back to the .webpart file.

How to integrate Spring Webflow, Spring Mobile and WURFL

I wonder if anyone can help. I am working on a Spring Webflow 2 app, where I would also like to integrate Spring Mobile 1.0 with WURFL 1.4.2.
I have got Webflow and Spring Mobile working together like this:
<bean id="handlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="order" value="1"/>
<property name="mappings">
<value>/fnol=flowController</value>
</property>
<property name="interceptors">
<list>
<bean class="org.springframework.mobile.device.DeviceResolverHandlerInterceptor" />
</list>
</property>
And then within one of my action classes I can do this:
public Event startUp(RequestContext arg0) throws Exception {
// get the http request form the webflow RequestContext
ServletExternalContext externalContext = (ServletExternalContext) arg0.getExternalContext();
HttpServletRequest request = (HttpServletRequest) externalContext.getNativeRequest();
// get the Spring Mobile Device
Device currentDevice = DeviceUtils.getCurrentDevice(request);
This seems to work OK, but now I'd like to use WURFL with Spring Mobile so that I get a richer object representing the client capabilities.
This link suggests that I should be able to add a constructor to the DeviceResolverHandlerInterceptor like this:
<bean id="handlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="order" value="1"/>
<property name="mappings">
<value>/fnol=flowController</value>
</property>
<property name="interceptors">
<list>
<bean class="org.springframework.mobile.device.DeviceResolverHandlerInterceptor">
<constructor-arg>
<device:wurfl-device-resolver root-location="/WEB-INF/wurfl/wurfl.zip" />
</constructor-arg>
</bean>
</list>
</property>
And I define the device namespace as:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:webflow="http://www.springframework.org/schema/webflow-config"
xmlns:device="http://www.springframework.org/schema/mobile/device"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd
http://www.springframework.org/schema/mobile/device
http://www.springframework.org/schema/mobile/device/spring-mobile-device-1.0.xsd" >
As far as my IDE is concerned (Eclipse) it is happy, and it deploys to wtp no problem. But when I start wtp I get the following error:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/mobile/device]
Offending resource: class path resource [fnol-webContext.xml]
Bean 'handlerMapping'
-> Property 'interceptors'
-> Bean ''
-> Constructor-arg
I'm not really sure what this means. Any ideas anyone?
Appreciate any help you guys can offer,
Cheers, Nathan
Had a look through the github repo to see if I could discern what happened: looks like WURFL support was deliberately removed due to licensing anomalies
https://github.com/SpringSource/spring-mobile/commit/ca81c6c20f1a9e524b0150e14dab20b020676e0b
This page alludes to a separate project which would provide WURFL support: I've not found it.

MOSS Minimal Publishing Site Definition

I'm using the MOSS Minimal Publishing Site Definition from codeplex.
I want to change the default.aspx page to be a publishing page by default, rather than a WSS page as it is currently in this site definition.
Is that possible?
To implement this in the web UI:
You need to create a new page within your publishing site, and then set that page as the 'Welcome' page within Site Settings.
Essentially this will overide the default.aspx and use your new publishing page as the initial opening page for your site.
To implement this for a site definintion:
You need to create a feature which deploys an instance of your initial page to the pages library and then sets the welcome page using the object model (probably using a FeatureReceiver).
More info on how to do this here:
http://www.devexpertise.com/2009/02/02/setting-the-welcome-page-in-wss-30/
You can use the following also (the example is with FeatureStapling):
<!-- Publishing feature -->
<FeatureSiteTemplateAssociation Id="22A9EF51-737B-4ff2-9346-694633FE4416" TemplateName="TEMPLATENAME#NUMBER">
<Property Key="ChromeMasterUrl" Value="~SiteCollection/_catalogs/masterpage/YOURMASTERPAGE.master"/>
<Property Key="WelcomePageUrl" Value="YOURDEFAULTPAGE.aspx"/>
<Property Key="PagesListUrl" Value=""/>
<Property Key="AvailableWebTemplates" Value="ALLOWED_TEMPLATES"/>
<Property Key="AvailablePageLayouts" Value="PAGELAYOUTS"/>
<Property Key="AlternateCssUrl" Value="" />
<Property Key="SimplePublishing" Value="true" />
</FeatureSiteTemplateAssociation>

Resources