I get all teams using the following API call:
GET https://graph.microsoft.com/beta/teams
How do I get the associated Group ID out of this call?
With the Teams Powershell module it is quite easy:
$GroupId = (Get-Team -DisplayName $NewTeamName).GroupId
Many thanks!
You cannot list teams using /teams, only get a specific team using /teams/{group-id}.
You can however list teams in an org. using this:
GET https://graph.microsoft.com/v1.0/groups?$filter=resourceProvisioningOptions/Any(x:x eq 'Team')
docs
this returns the id amoung others
Certain unused old teams will not have resourceProvisioningOptions set. For details, see known issues.
If you want to get ids from the users own joined teams, you can do this:
GET https://graph.microsoft.com/v1.0/me/joinedTeams
docs
with all that covid-19 thing I want to make something that tracks classroom courses that i am subscribed to and take some information like this:
Example:
¡Hey you have a new assignment from {teacher name}.
Title: {HOMEWORK TITLE}
Expire date: {DATE WHEN THE ASSIGNMENT EXPIRES}
Is it possible to get that information from the Google Classroom API or should I change the way I take the information?
I need to get all contacts from Microsoft Exchange.. Those contacts are also saved in Office365 -> People -> Directory. Many thx for help!
Use the ResolveName("SMTP:") API to retrieve all the contacts from Global Address List, the limitation of such is it only returns the top 100 from the query operation.
Your Managed EWS code works similar to
var nameResolutionCollection = service.ResolveName("SMTP:");
foreach(var item in nameResolutionCollection)
{
// your code in here
}
Find out more information from
https://msdn.microsoft.com/en-us/library/office/aa563518%28v=exchg.150%29.aspx.
I have been trying to integrate a payment system for a subscription service using Laravel Cashier.
I have set up my RegistrationController so that it works out how many days until the first day of the next month.
Using $user->trial_ends_at = Carbon::now()->addDays($datediff);
When creating a user it sets the trial end date for the first of the next month.
From here I want to use the $user->onTrial() method to create the actual subscription.
Please note: Even though the user is created there is no customer created in Stripe as the subscription has not yet been created.
My questions:
In the registration form the card details are taken so the users can subscribe and set up their payment method. This involves stripe validating the card and sending back a token.
Can this token be stored and used later?
Assuming I can use this token later on, to create the actual subscription in cashier I have to check whether the users trial has ended using the onTrial method.
The subscription is created using this:
$user->subscription($subscription_plan)->create($stripeToken);
Where is best to add the above code so that the user is subscribed and the billing period is started at the end of the trial?
This isn't mentioned at all in the in the documentation so I was just wondering if I create a new controller to actually start the subscription where to call the function and how to get it to run as each users trial ends.
Edit:
Would something like this be possible using Queues?
http://laravel.com/docs/4.2/queues
$start_subscription = Carbon::now()->addDays($datediff);
Queue::later($start_subscription, 'RegistrationController#subscribe',
array('stripeToken' => $stripeToken, 'details' => $otherDetails));
and then run the subscription method for each user at the set time.
I noticed some issues with creating the Stripe customer at the same time as the subscription. I was ending up with lots of extra customers inside Stripe because if the customer is created, but the subscription has an error, it doesn't connect them in Cashier, but the customer is connected in Stripe.
So to separate the two, I created a helper method in the User model. It will let me create the customer without creating a subscription. I can then create a subscription at a later time.
I think this addresses your issue.
Helper methods in user model:
/**
* Method to create stripe customer without subscription
*/
public function createStripeCustomer($token, $properties) {
$gateway = $this->subscription();
$customer = $gateway->createStripeCustomer($token, $properties);
$gateway->updateLocalStripeData($customer);
}
public function getStripeCustomer() {
$gateway = $this->subscription();
return $gateway->getStripeCustomer();
}
Then in my API controller where I handle the subscription:
if (!$user->getStripeId()) {
$user->createStripeCustomer($inputs['token'], ['email' => $user->email]);
//this can be done at a much later time, the customer is already stored.
$user->subscription($inputs['plan'])->create(null, [], $user->getStripeCustomer());
Flash::success("Subscription Success!");
} elseif (!$user->getStripeSubscription()) {
$user->subscription($inputs['plan'])->create($inputs['token'], [], $user->getStripeCustomer());
Flash::success("Subscription Success!");
}
As for the Stripe token, you'll want to use that within a few moments of its creation. It's not expected to last for longer than that.
As for your other questions, I'm not a Laravel person, so I couldn't speak to that, but PHP's strtotime() function takes a variety of strings and returns a timestamp. So if you always wanted to have billing start at noon of the first of the next month, you'd set your timestamp to:
strtotime('first day of next month 12:00');
Hope that helps,
Larry
PS I work on Support at Stripe.
I am creating a utility to get sync room calendar with my application.
They way i do is by calling syncfolderitems function for the room I want to sync.
Issue:
Since a User creates an Appointment and we are syncing room calendar thus we are not able to fetch value for Resources property. After doing some research I found that there is an extended property that can be used to find all attendees (Rooms are also attendees) of appointment.
Extended property was "PidLidAllAttendeesString".
Issue with this property is that it returns all the attendees of an appointment (Sendable and Unsendable both).
Is there any property that contains only Sendable attendees data ?
Based on [MS-OXPROPS], PidLidToAttendeesString "Contains a list of all of the sendable attendees who are also required attendees." Downloading the PDF of [MS-OXPROPS] and searching on "sendable" or "resource" might yield some other options too. Hope that helps!