Caller not authenticated when attempting access sharepoint list using Microsoft graph - microsoft-graph-api

Trying to use Microsoft's Graph beta to access a Sharepoint list via a registered Azure app using a key. I'm able to successful see/access some lists(looks like only lists created when site was created), but any list I have manually created is missing.
I can do the following get to list most lists in my site:
https://graph.microsoft.com/beta/sites/contoso.sharepoint.com,fc016e3c-d8ae-4ee0-a10c-de6d26788b6a,9a4ea7a5-c3c4-44ae-9f80-273bd67431b8\lists
but for some reason it's only displaying certain lists and none of the ones I created. However if enter the list's GUID like this
https://graph.microsoft.com/beta/sites/contoso.sharepoint.com,fc016e3c-d8ae-4ee0-a10c-de6d26788b6a,9a4ea7a5-c3c4-44ae-9f80-273bd67431b8/lists/BEA4B4A9-323F-441A-BA19-806290B27EF6
I receive "the caller is not authenticated" message back. This is message has me thinking it's a permissions issue, however, my list permissions are the same on all lists. it's as if the graph api can only see lists created by the system and not by end users.
Anybody experiencing this issue?

I've seen this issue on my end. The "save item to list" function works for some accounts and not others... It's extremely weird! Typical SharePoint, I suppose.
What I've come to realize is that GRAPH will sometimes throw an error when trying to save data to a date field and works every time saving data to text fields. If I'm logged in as my main O365 account (with license) I can save to date fields. If I'm logged in with a basic user that I just created on the domain (no license) I can create items unless there's a date field.
If I come up with anything else I'll post it! Sorry, this is more of a work-around than an answer. Hopefully it will spark something else.
Thanks

Related

MS graph user has multiple calendars with name 'calendar'

we are using software to push events to calendars using MS Graph, however 2 of the users are getting errors saying the user has multiple calendars with the name 'Calendar'
When i use the MS graph explorer on
https://developer.microsoft.com/en-us/graph/graph-explorer
I can see that there are 2 calendars setup the same, but with different ID's.
however in outlook and O365 online, and on the exchange admin console, i cannot see the 2 calendars only the one.
Is there somewhere that we can get to the calendars and either combine them or remove one?
Thanks in advance.
Programmatically ids only will help you to differentiate. To overcome the scenario, i would suggest you to rename the calendar names in a meaningful way in the UI. If its not showing in UI, it means the calendar folder might be hidden.
You updated that you will have a go at renaming it, then will go for the delete if you cant resolve it, as the user doesn't use the calendar much.
I ran into this issue on one mailbox, and came here to post the resolution as I had to dig around and piece together a way to resolve it.
I'm sure there's a way to add the correct MS Graph permissions to an admin account to resolve this without logging in as the user, but I couldn't get that part right so here's what I did:
Took a backup of the user calendar just in case.
Verified only one calendar named "Calendar" was displaying in Outlook.
Have the user login to the MS Graph site as themselves.
https://developer.microsoft.com/en-us/graph/graph-explorer.
If you need to verify the UUID for this user, GET their UUID by running the default query:
https://graph.microsoft.com/v1.0/me/
GET the associated calendars with their mailbox, you can search "calendar" in the sample queries menu to find "GET all my calendars" or you can just paste this in and run the query:
https://graph.microsoft.com/v1.0/me/calendars
You may need to click "Modify permissions" and consent to the permission to read calendar items. If so, you'll receive a notification in the MS Graph query.
With this, I found two calendars named 'calendar', but only one of them was marked as "isRemoveable":true,
Note down this UUID
Again this command may prompt to give additional permissions, but using the reference at https://learn.microsoft.com/en-us/graph/api/calendar-delete?view=graph-rest-1.0&tabs=http I ran the following command:
Choose DELETE in the drop-down, append the command /me/calendars/{CALENDAR UUID} and run it.
You will receive a confirmation message that almost looks like an error. Green-colored response "No Content - 204"
At this point, test the sync again. The user had no ill-effects from this as the offending calendar wasn't even in use/visible in Outlook.

Azure - App Insights - how to track the logged-in Username in Auth Id?

What is the best-supported approach for tracking logged-in Usernames/Ids in App Insights telemetry?
A User with Username "JonTester1" said some Pages he visited 4 hours ago were really slow. How can I see everything JonTester1 did in App Insights to trouble shoot/know which pages he's referring to?
Seems like User Id in App Insights is some Azure-generated anonymized thing like u7gbh that Azure ties to its own idea of the same user (thru cookie?). It doesn't know about our app's usernames at all.
I've also seen a separate field in App Insights called Auth Id (or user_AuthenticatedId in some spots), which looks to sometimes have the actual username e.g. "JonTester1" filled in - but not always... And while I don't see any mention of this field in the docs, it seems promising. How is our app's code/config supposed to be setting that Auth Id to make sure every App Insights log/telemetry has it set?
Relevant MS docs:
https://learn.microsoft.com/en-us/azure/azure-monitor/app/usage-send-user-context
This looks to just copy one library Telemetry object's User Id into another... no mention of our custom, helpful Username/Id anyway... and most in-the-wild examples I see don't actually look like this, including MS docs own examples in the 3rd link below; they instead hardcode get a new TelemetryClient()
https://learn.microsoft.com/en-us/azure/azure-monitor/app/website-monitoring No mention of consistently tracking a custom Username/Id
https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-custom-events-metrics#authenticated-users Shows some different helpful pieces, but still no full example. E.g. it says with only the setAuth... JS function call (still no full example of working client-side JS that tracks User) on the page, you don't need any server-side code for it to track custom User Id across both client-side and server-side telemetry sent to Azure... yet then it also shows explicit code to new up a TelemetryClient() server-side to track User Id (in the Global.asax.cs or where?)... so you do need both?
Similar SO questions, but don't connect the dots/show a full solution:
Azure Insights telemetry not showing Auth ID on all transactions
Application Insights - Tracking user and session across schemas
How is Application insight tracking the User_Id?
Display user ID in the metrics of application Insight
I'm hoping this question and answers can get this more ironed out; hopefully do a better job of documentation than the relevant MS docs...
The first link in your question lists the answer. What it does show you is how to write a custom telemetry initializer. Such an initializer lets you add or overwrite properties that will be send along any telemetry that is being send to App Insights.
Once you add it to the configuration, either in code or the config file (see the docs mentioned earlier in the answer) it will do its work without you needing to create special instances of TelemetryClient. That is why this text of you does not make sense to me:
[…] and most in-the-wild examples I see don't actually look like this, including MS docs own examples in the 3rd link below; they instead hardcode get a new TelemetryClient()
You can either overwrite the value of UserId or overwrite AuthenticatedUserId in your initializer. You can modify the code given in the docs like this:
if (requestTelemetry != null && !string.IsNullOrEmpty(requestTelemetry.Context.User.Id) &&
(string.IsNullOrEmpty(telemetry.Context.User.Id) || string.IsNullOrEmpty(telemetry.Context.Session.Id)))
{
// Set the user id on the Application Insights telemetry item.
telemetry.Context.User.AuthenticatedUserId = HttpContext.Current.User.Identity.Name;
}
You can then see the Auth Id and User Id by going to your AI resource -> Search and click an item. Make sure to press "Show All" first, otherwise the field is not displayed.
Auth Id in the screenshot below is set to the user id from the database in our example:
We access the server from azure functions as well so we set the user id server side as well since there is no client involved in such scenarios.
There is no harm in settting it in both places, javascript and server side via an initializer. That way you cover all scenario's.
You can also manually add user id to app insights by
appInsights.setAuthenticatedUserContext(userId);
See App Insights Authenticated users

How do I get a realtime list of all seminars in a given room, filtered by time period, via Adobe Connect's API?

We are attempting to build free/busy calendars on our website for our Adobe Connect seminar rooms using data provided by the Adobe Connect API.
Our first attempt used sco-session-seminar-list. This returned data in the expected format and seemed to work perfectly. However, upon review we found that many existing sessions were not being returned. Some of the rooms do not have the API user setup as a host or presenter, so I suspect that may be causing a problem, though the user can see these sessions in the admin which indicates to me that they should have access.
We then tried report-bulk-objects. This did return all seminars as desired. However, it hits the reporting database which means that seminars created in the last 24 hours may not appear. Worse, it does not appear that there is any way to filter by room (or parent sco-id) using this method.
I cannot find any other relevant methods in the API documentation that would work better than the above two for our needs. However, it seems like a free/busy calendar should be a relatively common use of the API.
We finally found a non-intuitively named function that worked for this sort of information:
url="http://#AdobeConnectUrl#/api/xml
name="action" value="sco-expanded-contents">
name="sco-id" value="#roomID#">
name="filter-gte-date-begin" value="2015-01-01">
name="filter-lte-date-begin" value="2015-01-08">
This function will also work for a more informational calendar as it returns details other than just the start and end times (such as the seminar name). It pulls all sessions that occur under the sco-id requested, including those in subfolders. It also runs in real-time.

Find all users of all projects with Jira API

I need to get a list of projects for currently logged in user. I found the decision of oppozite task here: JIRA SOAP API : get the list of users
Is there a way to do this through Jira API?
Do you mean which projects a user is allowed to see issues in? If so, you want to use
getPermissionSchemes to retrieve an array of RemotePermissionSchemes, then use getPermissionMappings on each of those to get the permissions that you want to see, e.g. View Issues (by id). The problem is you'd have to do this for all projects (can be cached) but then getting the roles for the user only works for the logged in user.
summary: I'd write my own SOAP method to do this
These are 2 questions:
Which users are currently logged in?
List of projects for a user?
For the first one, I found some entries in the JIRA issue tracker: Users currently logged on
The second one is easier, have a look at the API

MOSS 2007 Published Site Page Status

Greetings all,
I have a question.
On my MOSS 2007 dev box, I created a new sharepoint site using the Publishing -> Publishing Site template.
Now, On this site, I can create pages, check them in, publish them, etc.
What I want to do is create a scope that I can do searches on. However, one of the filters I want to apply to the scope is to ignore everything which is not published.
Does anyone out there know of a property (which I can use in a metadata property in my shared service which is in turn used in my scope) to determine if a page is in a published status, draft status, any other sort of status?
Does such a property exist?
Thanks in advance for your help.
cmb..
By default, when you view pages in a SharePoint site, and you're not signed in (eg your a anon user) then you will only see the last published version of that page. You won't see the version currently being edited (if it is checked out).
Now, if you want to stop users who are signed in from searching any pages which are not checked in, then have a look at filtering using the 'Approved Status' field. I'm not sure how to do this myself, but that's usually the field you filter on for stuff like views.
Yes, the "Approval Status" field is what you're looking for.
The property you need to map to is "_ModerationStatus" within your SSP search configuration.

Resources