VB.NET Remove user from active directory
Date : March 29 2020, 07:55 AM
Hope this helps Well the error message 0x80004005 E_FAIL Unspecified failure is not very helpful. I often get frustrated when working with Active Directory. Try changing line: group.Properties("member").Remove(x.Properties("OrganizationalUnit").Value)
group.Invoke("Remove", New Object() {x.Path.ToString()})
|
How to make the google map work like google map application in android phones
Date : March 29 2020, 07:55 AM
To fix the issue you can do As you can see in the picture I have the zoom in zoom out button at the bottom left corner of the screen . I want to make it move little bit up or maybe add some new css to it so that its easier to use . Can some one help me out with this how to change this one ? , At last I could fix the problem totally Here is the script <script type="text/javascript">
/*
* Google Maps documentation: http://code.google.com/apis/maps/documentation/javascript/basics.html
* Geolocation documentation: http://dev.w3.org/geo/api/spec-source.html
*/
$( document ).on( "pageshow", "#map-page", function() {
<?php $coordenadas=explode(',',$fila['Googlemap']);?>
var defaultLatLng = new google.maps.LatLng('<?php echo $coordenadas[0];?>','<?php echo $coordenadas[1];?>');
$('#map-canvas').height( $(window).height() - $('#head1').height());
drawMap(defaultLatLng); // Default to Hollywood, CA when no geolocation support
//var latlng = marker.getPosition();
function drawMap(latlng) {
var myOptions = {
zoom: 10,
center: latlng,
streetViewControl:true,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map-canvas"), myOptions);
// Add an overlay to the map of current lat/lng
var marker = new google.maps.Marker({
position: latlng,
map: map,
title: "Greetings!"
});
// this is our gem
google.maps.event.addDomListener(window, "resize", function() {
var center = map.getCenter();
google.maps.event.trigger(map, "resize");
map.setCenter(center);
});
}
});
$(window).bind( 'orientationchange', function(e){
var ori = window.orientation ;
w = (ori==90 || ori==-90) ? window.height : window.width;
$('#map-canvas').width(w);
$('#map-canvas').height( $(window).height() - $('#head1').height());
});
</script>
|
Google User Provisiong using Google Admin SDK c# -- Google.Apis.Admin.Directory.directory_v1.cs not found
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , thanks all for replying, I managed to run it successfully, I had all the reference, Code was upto the mark as well. The Only problem was with the admin setting there in the google admin panel.
|
MS Graph Api is not returning all user information such as mobile phones ,office phones
Tag : chash , By : Enrique Anaya
Date : March 29 2020, 07:55 AM
Hope this helps First of all your scope deceleration is not correct. Microsoft Graph doesn't support multiple scope assignment as you trying to assign as list of string which also not in right format. Additionally not scopes it would be scope //Token Request End Point
string tokenUrl = $"https://login.microsoftonline.com/YourTenant.onmicrosoft.com/oauth2/v2.0/token";
var tokenRequest = new HttpRequestMessage(HttpMethod.Post, tokenUrl);
//I am Using client_credentials as It is mostly recommended
tokenRequest.Content = new FormUrlEncodedContent(new Dictionary<string, string>
{
["grant_type"] = "client_credentials",
["client_id"] = "b6695c7be-a695-4aea-ad87-e6921e61f659",
["client_secret"] = "Vxf1SluKbgu4PF0Nf_Your_Secret_Yp8ns4sc=",
["scope"] = "https://graph.microsoft.com/.default"
});
dynamic json;
AccessTokenClass results = new AccessTokenClass();
HttpClient client = new HttpClient();
var tokenResponse = await client.SendAsync(tokenRequest);
json = await tokenResponse.Content.ReadAsStringAsync();
results = JsonConvert.DeserializeObject<AccessTokenClass>(json);
//New Block For Accessing Data from Microsoft Graph Rest API
HttpClient _client = new HttpClient();
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, string.Format("https://graph.microsoft.com/v1.0/users"));
//Passing Token For this Request
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", results.access_token);
HttpResponseMessage response = await _client.SendAsync(request);
//Get User List With Business Phones and Mobile Phones
dynamic objGpraphUserList = JsonConvert.DeserializeObject<dynamic>(await response.Content.ReadAsStringAsync());
public class AccessTokenClass
{
public string token_type { get; set; }
public string expires_in { get; set; }
public string resource { get; set; }
public string access_token { get; set; }
}
|
Retrieve custom attribute from user profile in Google API Scripts- Google Admin Directory
Date : March 29 2020, 07:55 AM
it should still fix some issue According to Directory Api - Users: get you need to set the projection to "custom". var mycontact = AdminDirectory.Users.get({
"userKey": myemail,
"projection": "custom",
"customFieldMask": "Define Schema Here"
});
|