I tried to retrieve my eventbrite events using an API private token and my organization ID found in :
https://www.eventbrite.fr/organizations/info/profile/456xxxxxxx so I took this organisation ID and I plugged it in :
$eventbrite->get('organizations/'.$id_organisation.'/events/', ['status' => 'live']); .
This didn't yield any result.
Finally, I managed to retrieve the list of my eventbrite events using the same private token but with an organisation ID that I got from the URL https://www.eventbrite.fr/u/123xxxxxxx/favorites/events. What makes me wonder is that why did the API call manage to get me the events using an ID that is not id of the organization ? It is some sort of user id no ?
This might answer your question. From Eventbrite docs:
If you don't belong to any Organizations, your user_id is your default Organization ID.
https://www.eventbrite.com/platform/docs/organizations
Related
I use Microsoft Graph API to list users in my Azure AD B2C tenant. When I try to get it ordered by surname (lastname) I get this error:
Unsupported sort property 'surname' for 'User'.
What's supported is 'displayName', which may contain person name in the form of [firstName lastName] or [lastName firstName]. I wonder if there's any way to get the list ordered by last name.
The code, just in case:
IGraphServiceUsersCollectionRequest usersRequest = GraphClient.Users.Request()
.Select(u => new {u.Id, u.DisplayName, u.Mail, u.GivenName, u.UserPrincipalName, u.AccountEnabled, u.Surname}).OrderBy("displayName");
Unfortunately, you cannot use orderby parameter with surname in either standard Azure AD or Azure AD B2C tenants as of now.
You may post a feedback regarding this feature at Azure Feedback Portal, which is monitored by the product team for product enhancements.
I am trying to add a new member to a MS Team, but I cannot get it to work.
It adds the new member to the group, but that's where it stops. It does not add the member to the team object.
This is what I am doing:
POST to 'groups/' + groupId + '/members/$ref' with the right data.
There is no error. It updates the group with the new member, but when I check the team, the new member is not there. What am I missing?
Adding user by email alias is still not supported. Requesting you to try passing following JSON which is present in API documentation?
Pass DirectoryObjectId instead of email Id:
{ "#odata.id": "https://graph.microsoft.com/v1.0/directoryObjects/{id}" }
i am reading the identityserver4 guildence, here is the example code
UserClaims =
{
new UserClaim(JwtClaimTypes.Name),
new UserClaim(JwtClaimTypes.Email)
},
// this API defines two scopes
Scopes =
{
new Scope()
{
Name = "api2.full_access",
DisplayName = "Full access to API 2",
},
new Scope
{
Name = "api2.read_only",
DisplayName = "Read only access to API 2"
}
}
my questions is
seems the scope is used to control which client can access the api resources, and user claims controler the user permission on apis. let's take a look at "api2.read_only", does this mean client with this scope can only have the read access to the apis? but what if the user has for example: write access for a speicific api? i get confuse about the these two.
thanks in advance for your help.
Scopes defines whether you have access to the API or not. Where as Claims are more granular. Within the API, what resource you can access? for example, you can access identity resource like name.
Scopes are special claims which define what resources a client can have access to.
User claims are just assertions about a user. You would normally give a user a "role" or "permission" claim (or something like that). By using the user claims you can do some claims authorization if doing authorization based on scopes does not satisfy your requirements.
I want to retrieve data of particular user from two different tables such as "Organizations" and "SystemUsers" in which the company details are stored in "Organizations" & his personal info. is stored in "Systemusers" like emailid,password etc..
But what my requirement is I want to retrieve that particular user organization details as well as personal info like emailid, using entityframework in asp.net mvc. Can anyone suggest me the query to do this.
Table: Organizations
public string CompanyName {get; set;}
Table : Systemusers
public string Email {get; set;}
So, I want to retrieve the user company details as well as personal details from two tables so as to display them in search form.Can anyone suggest me query for this????
going by your description and lack of code im assuming that every user will have 0 or 1 organization.
so 1. you will have to make a one to 0 or 1 relation between user and organization then a simple query on the SystemUser table will retrieve the Users personal info and because now in this table you will have a foreign key (assuming name to be Organization) you can retrieve the organiation info using .Organization property of the retrieved SystemUser
Is there any way to check if a course is Active.
I currently retrieve a list of courses for an instructor by:
GET /d2l/api/lp/(/D2LVERSION: //version/)/enrollments/users/(/D2LID: //userId/)/orgUnits/
Once I have the list of enrollments for the user, I can filter which
ones the user is an Instructor in.
Once I have the courses the user is an Instructor in, how can I check
which ones are active?
I see that the data MyOrgUnitInfo may be available in the call:
GET /d2l/api/lp/(/D2LVERSION: //version/)/enrollments/myenrollments/
However, this is not applicable to me, as I am getting enrollments based
on a userId
If you are not able to use the "myenrollments" call to retrieve the enrollments within the instructor's calling user context, then the route to find out which courses within an identified user's enrollments are active is a bit more complex.
1) You can first use
/d2l/api/lp/{ver}/enrollments/user/{userId}/orgUnits&roleId={roleId}&orgUnitTypeId={orgUnitType}
to filter the list of returned enrollments by role and by org unit type: use the "instructor" role ID and the org unit type ID for course offerings in the call.
This will fetch you back a paged list of OrgUnitInfo structures, which in turn contain the org unit ID for all the org units.
2) Once you have this list of org unit IDs, you can test each one in the list to see if its active with
/d2l/api/lp/{ver}/courses/{orgUnitId}
This will fetch back the CourseOffering structure for each course, containing an IsActive property telling you if the course offering is active or not.